Last active
March 28, 2017 08:16
-
-
Save rygo6/45768c4c8a8292a8af1e6192e578ae1f to your computer and use it in GitHub Desktop.
Default unit test script for Unity.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
using NUnit.Framework; | |
public class NewEditorTest { | |
[Test] | |
public void EditorTest() | |
{ | |
//Arrange | |
var gameObject = new GameObject(); | |
//Act | |
//Try to rename the GameObject | |
var newGameObjectName = "My game object"; | |
gameObject.name = newGameObjectName; | |
//Assert | |
//The object has a new name | |
Assert.AreEqual(newGameObjectName, gameObject.name); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment