Add SanityTest to bamlab.test.playmode
parent
4b72ed9c27
commit
f13103a9e5
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2e04183212e40bf43a2625427494a839
|
Loading…
Reference in New Issue