< Summary

Class:PhoneRingScreen
Assembly:Test
File(s):D:/--UnityProject/VR/VRExplorer_subjects/VR-Room/Assets/_Course Library/Scripts/Test/PhoneRingScreen.cs
Covered lines:10
Uncovered lines:3
Coverable lines:13
Total lines:28
Line coverage:76.9% (10 of 13)
Covered branches:0
Total branches:0
Covered methods:2
Total methods:2
Method coverage:100% (2 of 2)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Start()0%000100%
Update()0%00066.67%

File(s)

D:/--UnityProject/VR/VRExplorer_subjects/VR-Room/Assets/_Course Library/Scripts/Test/PhoneRingScreen.cs

#LineLine coverage
 1using System.Collections;
 2using System.Collections.Generic;
 3using UnityEngine;
 4
 5public class PhoneRingScreen : MonoBehaviour
 6{
 7    private AudioSource audioSource;
 8    private Material original_material;
 9    // private Renderer renderer;
 10    public Material calling_material;
 11    void Start()
 812    {
 813        audioSource = GetComponent<AudioSource>();
 814        original_material = GetComponent<Renderer>().material;
 815    }
 16
 17    void Update()
 1353418    {
 1353419        if(audioSource.isPlaying)
 020        {
 021            GetComponent<Renderer>().material = calling_material;
 022        }
 23        else
 1353424        {
 1353425            GetComponent<Renderer>().material = original_material;
 1353426        }
 1353427    }
 28}

Methods/Properties

Start()
Update()