Exemplo n.º 1
0
        public void RoleCanAddDirection()
        {
            var target = new Character();
            Assert.AreEqual(0, target.Directions.Count);

            target.Add(new Direction());
            target.Add(new Direction());
            Assert.AreEqual(2, target.Directions.Count);
        }
Exemplo n.º 2
0
        public void RoleCanSetName()
        {
            var target = new Character();
            Assert.IsNull(target.Name);

            target.Name = "Falstaff";
            Assert.AreEqual("Falstaff", target.Name);

            target.Name = "Bardolfo";
            Assert.AreEqual("Bardolfo", target.Name);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        public void RoleCanRemoveDirection()
        {
            var target = new Character();

            var direction1 = new Direction();
            var direction2 = new Direction();
            target.Add(direction1);
            target.Add(direction2);
            Assert.AreEqual(2, target.Directions.Count);

            target.Remove(direction1);
            Assert.AreEqual(1, target.Directions.Count);
        }
Exemplo n.º 5
0
        public void DirectionCanSetActor()
        {
            var target = new Direction();
            Assert.IsNull(target.Character);

            var actor = new Character();
            target.Character = actor;
            Assert.AreEqual(actor, target.Character);

            actor = new Character();
            target.Character = actor;
            Assert.AreEqual(actor, target.Character);
        }
Exemplo n.º 6
0
 public virtual void Remove(Character actor)
 {
     Characters.Remove(actor);
 }
Exemplo n.º 7
0
 public virtual void Add(Character actor)
 {
     Characters.Add(actor);
 }