< Summary

Class:PlaySound
Assembly:Test
File(s):D:/--UnityProject/VR/_____ISSTA 26/vr-firefighter-simulator/Assets/Test/PlaySound.cs
Covered lines:4
Uncovered lines:3
Coverable lines:7
Total lines:15
Line coverage:57.1% (4 of 7)
Covered branches:0
Total branches:0
Covered methods:2
Total methods:3
Method coverage:66.6% (2 of 3)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
PlaySound()0%000100%
Awake()0%000100%
PlaySoundShot()0%0000%

File(s)

D:/--UnityProject/VR/_____ISSTA 26/vr-firefighter-simulator/Assets/Test/PlaySound.cs

#LineLine coverage
 1using UnityEngine;
 2
 3public class PlaySound : MonoBehaviour
 4{
 25    public bool canPlay = false;
 6    private AudioSource source;
 7    void Awake()
 18    {
 19        this.source = this.GetComponent<AudioSource>();
 110    }
 11
 012    public void PlaySoundShot() {
 013        if (this.source != null && this.canPlay) this.source.PlayOneShot(this.source.clip);
 014    }
 15}

Methods/Properties

PlaySound()
Awake()
PlaySoundShot()