Namespace: DeltaEngine.Scenes.Tests
Assembly: DeltaEngine.Scenes.Tests (in DeltaEngine.Scenes.Tests.dll) Version: 1.1.1.0 (1.1.1)
Assembly: DeltaEngine.Scenes.Tests (in DeltaEngine.Scenes.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Examples
[Test] public void LoadSceneWithAButton() { var loadedScene = ContentLoader.Load<Scene>("SceneWithAButton"); Assert.AreEqual("SceneWithAButton", loadedScene.Name); Assert.AreEqual(1, loadedScene.Controls.Count); Assert.AreEqual(typeof(Button), loadedScene.Controls[0].GetType()); }
[Test, CloseAfterFirstFrame] public void LoadSceneWithAButtonAndChangeTheMaterial() { var loadedScene = ContentLoader.Load<Scene>("SceneWithAButtonWithChangedMaterial"); Assert.AreEqual("SceneWithAButtonWithChangedMaterial", loadedScene.Name); Assert.AreEqual(1, loadedScene.Controls.Count); Assert.AreEqual(typeof(Button), loadedScene.Controls[0].GetType()); }
[Test, CloseAfterFirstFrame] public void LoadSceneWithAButtonAndChangeTheFontText() { var loadedScene = ContentLoader.Load<Scene>("SceneWithAButtonWithDifferentFontText"); Assert.AreEqual("SceneWithAButtonWithDifferentFontText", loadedScene.Name); Assert.AreEqual(1, loadedScene.Controls.Count); Assert.AreEqual(typeof(Button), loadedScene.Controls[0].GetType()); }
See Also