< Summary

Class:SanityTest
Assembly:bamlab.test.playmode
File(s):/github/workspace/Assets/Tests/PlayMode/SanityTest.cs
Covered lines:7
Uncovered lines:0
Coverable lines:7
Total lines:24
Line coverage:100% (7 of 7)
Covered branches:0
Total branches:0
Covered methods:1
Total methods:1
Method coverage:100% (1 of 1)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
SanityCheck()0%330100%

File(s)

/github/workspace/Assets/Tests/PlayMode/SanityTest.cs

#LineLine coverage
 1using System.Collections;
 2using NUnit.Framework;
 3using UnityEngine;
 4using UnityEngine.TestTools;
 5
 6public class SanityTest {
 7  [UnityTest]
 18  public IEnumerator SanityCheck() {
 9    // Arrange
 110    GameObject testObject = new GameObject("TestObject");
 11
 12    // Act
 113    testObject.AddComponent<BoxCollider>();
 14
 15    // Assert
 116    Assert.IsTrue(testObject.GetComponent<BoxCollider>() != null,
 17                  "BoxCollider should be added to the test object");
 18
 19    // Clean up
 120    Object.Destroy(testObject);
 21
 122    yield return null;
 123  }
 24}

Methods/Properties

SanityCheck()