ObjectMenuCreationTests.cs 659 B

123456789101112131415161718192021
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using NUnit.Framework;
  5. using UnityEngine.TestTools;
  6. using UnityEditor;
  7. namespace UnityEngine.U2D
  8. {
  9. internal class ObjectMenuCreationTests
  10. {
  11. [Test]
  12. public void ExecuteMenuCommandCreatesGameObjectWithPixelPerfectCamera()
  13. {
  14. var transformCount = Object.FindObjectsOfType<Transform>();
  15. EditorApplication.ExecuteMenuItem("GameObject/2D Object/Pixel Perfect Camera");
  16. LogAssert.NoUnexpectedReceived();
  17. Assert.True(Object.FindObjectsOfType<Transform>().Length > transformCount.Length);
  18. }
  19. }
  20. }