You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
659 B
C#

3 years ago
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using NUnit.Framework;
using UnityEngine.TestTools;
using UnityEditor;
namespace UnityEngine.U2D
{
internal class ObjectMenuCreationTests
{
[Test]
public void ExecuteMenuCommandCreatesGameObjectWithPixelPerfectCamera()
{
var transformCount = Object.FindObjectsOfType<Transform>();
EditorApplication.ExecuteMenuItem("GameObject/2D Object/Pixel Perfect Camera");
LogAssert.NoUnexpectedReceived();
Assert.True(Object.FindObjectsOfType<Transform>().Length > transformCount.Length);
}
}
}