Skip to content

Commit

Permalink
Add SanityTest to bamlab.test.playmode
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellovell committed Oct 2, 2024
1 parent 4b72ed9 commit f13103a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Assets/Tests/PlayMode/SanityTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using System.Collections;
using NUnit.Framework;
using UnityEngine;
using UnityEngine.TestTools;

public class SanityTest
{
[UnityTest]
public IEnumerator SanityCheck()
{
// Arrange
GameObject testObject = new GameObject("TestObject");

// Act
testObject.AddComponent<BoxCollider>();

// Assert
Assert.IsTrue(testObject.GetComponent<BoxCollider>() != null, "BoxCollider should be added to the test object");

// Clean up
Object.Destroy(testObject);

yield return null;
}
}
2 changes: 2 additions & 0 deletions Assets/Tests/PlayMode/SanityTest.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f13103a

Please sign in to comment.