Created
February 19, 2022 20:53
-
-
Save aallbrig/61ce9c12cf184a559e243fc951a3218c to your computer and use it in GitHub Desktop.
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
public class LevelOneTests | |
{ | |
private const string TargetScene = "Level One"; | |
public static string[] ExpectedGameElements = | |
{ | |
"Player" | |
}; | |
private GameObject FindGameObjectByName(string name) => GameObject.Find(name); | |
[UnityTest] | |
public IEnumerator TheSceneFeaturesTheseElements( | |
[ValueSource(nameof(ExpectedGameElements))] | |
string gameObjectName | |
) | |
{ | |
Scene sut; | |
yield return SceneLoader.LoadTargetScene(TargetScene, scene => sut = scene); | |
Assert.NotNull(GameObject.Find(gameObjectName)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment