Last active
August 26, 2019 15:15
-
-
Save rkandas/9eb5ed9eebd4016106034213fa650b2f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public class AssetSpawnerTest | |
{ | |
[UnityTest] | |
public IEnumerator Should_InstantiateObject_When_GivenStringHasNameAndPosition() | |
{ | |
//given | |
String csvString = "CubeX,2,3,3"; | |
String expectedName = "CubeX"; | |
Vector3 expectedCoordinate = new Vector3(2f,3f,3f); | |
//when | |
AssetSpawner assetSpawner = new AssetSpawner(); | |
assetSpawner.createAGameObjectFromString(csvString); | |
//then | |
GameObject obj = GameObject.Find(expectedName); | |
Assert.IsNotNull(obj); | |
Assert.AreEqual(expectedCoordinate, obj.transform.position); | |
yield return null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment