Пример #1
0
        public void WoodenDuckFlyByRocketTest()
        {
            Duck duck = new WoodenDuck();

            var actual   = duck.Fly();
            var expected = "cannot fly";

            Console.WriteLine(actual);
            Assert.AreEqual(expected, actual);

            duck.SetFlyBehaviour(new RocketFlyBehaviour());
            actual   = duck.Fly();
            expected = "rocket powered fly";
            Console.WriteLine(actual);
            Assert.AreEqual(expected, actual);
        }
Пример #2
0
        public void WoodenDuckFlyTest()
        {
            Duck duck = new WoodenDuck();

            var actual   = duck.Fly();
            var expected = "cannot fly";

            Assert.AreEqual(expected, actual);
        }