public void SceneCanAddCharacter() { var target = new Scene(); Assert.AreEqual(0, target.Characters.Count); target.Add(new Character()); target.Add(new Character()); Assert.AreEqual(2, target.Characters.Count); }
public void SceneCanSetAct() { var target = new Scene(); Assert.IsNull(target.Act); var act = new Act(); target.Act = act; Assert.AreEqual(act, target.Act); }
public void SceneCanRemoveCharacter() { var target = new Scene(); var character1 = new Character(); var character2 = new Character(); target.Add(character1); target.Add(character2); Assert.AreEqual(2, target.Characters.Count); target.Remove(character1); Assert.AreEqual(1, target.Characters.Count); }
public void ActCanRemoveScene() { var target = new Act(); var scene1 = new Scene(); var scene2 = new Scene(); target.Add(scene1); target.Add(scene2); Assert.AreEqual(2, target.Scenes.Count); target.Remove(scene1); Assert.AreEqual(1, target.Scenes.Count); }
public void DirectionCanSetScene() { var target = new Direction(); Assert.IsNull(target.Scene); var scene = new Scene(); target.Scene = scene; Assert.AreEqual(scene, target.Scene); scene = new Scene(); target.Scene = scene; Assert.AreEqual(scene, target.Scene); }
public virtual void Remove(Scene scene) { scene.Act = null; Scenes.Remove(scene); }
public virtual void Add(Scene scene) { scene.Act = this; Scenes.Add(scene); }