Ejemplo n.º 1
0
 public void Human_Props()
 {
     Human[] humans = new Human[]
     {
         new Boy {
             FirstName = "Kirill", LastName = "Kovalyov"
         },
         new Girl {
             FirstName = "Ann", LastName = "Ordo"
         }
     };
     Assert.AreEqual("Kirill Kovalyov, Ann Ordo", string.Join(", ", humans.Select(h => h.FullName)));
     Assert.AreEqual("Handshake, Hangs", string.Join(", ", humans.Select(h => h.Introduction)));
     Assert.AreEqual("Boy: Kirill Kovalyov, Girl: Ann Ordo", string.Join(", ", humans.Select(h => h.ToString())));
 }
Ejemplo n.º 2
0
        public void human_on_select_must_switch_to_move_command_input_state()
        {
            Human human = Factory.Create <Human>("human", _spawnPosition);

            human.Select();

            if (CommandInputStateMachine.currentCommandState.GetType() != typeof(MoveCommandInputState))
            {
                Assert.Fail();
            }

            human.Die();
            Assert.Pass();
        }