Add SanityTest to bamlab.test.playmode

master
Daniel Lovell 2024-10-02 02:23:30 -07:00
parent 4b72ed9c27
commit f13103a9e5
2 changed files with 27 additions and 0 deletions

View File

@ -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;
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 2e04183212e40bf43a2625427494a839