SW 중심대학 OSS GIT 서버 박건태, 이승준, 고기완, 이준호 새로운 배포
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.0 KiB

4 years ago
  1. using NUnit.Framework;
  2. using Unity.Collections;
  3. namespace UnityEngine.XR.ARSubsystems.Tests
  4. {
  5. public class XRPlaneSubsystemImpl : XRPlaneSubsystem
  6. {
  7. protected override Provider CreateProvider() => new TestProvider();
  8. class TestProvider : Provider
  9. {
  10. public override TrackableChanges<BoundedPlane> GetChanges(BoundedPlane defaultPlane, Allocator allocator)
  11. {
  12. return default;
  13. }
  14. }
  15. }
  16. [TestFixture]
  17. public class XRPlaneSubsystemTestFixture
  18. {
  19. [Test]
  20. public void RunningStateTests()
  21. {
  22. XRPlaneSubsystem subsystem = new XRPlaneSubsystemImpl();
  23. // Initial state is not running
  24. Assert.That(subsystem.running == false);
  25. // After start subsystem is running
  26. subsystem.Start();
  27. Assert.That(subsystem.running == true);
  28. // After start subsystem is running
  29. subsystem.Stop();
  30. Assert.That(subsystem.running == false);
  31. }
  32. }
  33. }