Ejemplo n.º 1
0
        public void Voice_AwakeAnimal_DoesNotContainSubstringAwake()
        {
            string substr = "не спит";
            string res    = g1.Voice();

            Assert.IsFalse(res.Contains(substr));
        }
Ejemplo n.º 2
0
        public void VoiceGiraffe()
        {
            MainCage mc = new MainCage();

            Animal giraffe  = new Giraffe();
            string expected = "It's a GIRAFFE!";

            string v = giraffe.Voice();

            Assert.AreEqual(expected, v);
        }
Ejemplo n.º 3
0
        public void Voice_WhenAllAnimalsIsSleeping_ReturnsAllVoices()
        {
            zoo.ChangeDayMode(DayMode.Night);
            giraffe.IsSleeping = true;
            bear.IsSleeping    = true;

            StringBuilder builder = new StringBuilder();

            builder.Append(giraffe.WakeUp()).AppendLine(giraffe.Voice()).AppendLine().Append(bear.WakeUp()).AppendLine(bear.Voice()).AppendLine();

            giraffe.IsSleeping = true;
            bear.IsSleeping    = true;
            var result = zoo.Voice();

            Assert.Equal(builder.ToString(), result);
        }