< Summary

Class:ExitDoor
Assembly:Test
File(s):D:/--UnityProject/VR/VRExplorer_subjects/Edutainment-Escape-Room/Assets/Scripts/Test/Door Events/ExitDoor.cs
Covered lines:14
Uncovered lines:5
Coverable lines:19
Total lines:37
Line coverage:73.6% (14 of 19)
Covered branches:0
Total branches:0
Covered methods:4
Total methods:4
Method coverage:100% (4 of 4)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
ExitDoor()0%000100%
Start()0%000100%
onFinish()0%000100%
OnTriggerEnter(...)0%00037.5%

File(s)

D:/--UnityProject/VR/VRExplorer_subjects/Edutainment-Escape-Room/Assets/Scripts/Test/Door Events/ExitDoor.cs

#LineLine coverage
 1using System;
 2using System.Collections;
 3using System.Collections.Generic;
 4using UnityEngine;
 5
 6public class ExitDoor : MonoBehaviour
 7{
 88    bool isOpened = false;
 9    Animator Anim;
 10
 11    public Timer timer;
 12
 13    // Start is called before the first frame update
 14    void Start()
 715    {
 716        Anim = this.GetComponent<Animator>();
 717    }
 18
 19    public void onFinish()
 320    {
 321        if (!isOpened)
 322        {
 323            isOpened = true;
 324            Anim.SetTrigger("DoorTrigger");
 325        }
 326    }
 27
 28    private void OnTriggerEnter(Collider col)
 729    {
 730        if (isOpened)
 031        {
 032            isOpened = false;
 033            Anim.SetTrigger("DoorTrigger");
 034            timer.removeOutOfTime();
 035        }
 736    }
 37}