public void TestWildTurkey()

        {

            Turkey wildTurkey = new WildTurkey();

            Assert.AreEqual("Gooble, gooble",wildTurkey.Gobble());

            Assert.AreEqual("I'm flying a short distance",wildTurkey.Fly());

        }
Exemplo n.º 2
0
        public void TestTurkeyAdapter()
        {
            Turkey wildTurkey = new WildTurkey();
            Duck turkeyAdapter = new TurkeyAdapter(wildTurkey);

            Assert.AreEqual("Gooble, gooble",turkeyAdapter.Quack());
            Assert.AreEqual("I'm flying a short distance\n" +
                "I'm flying a short distance\n" +
                "I'm flying a short distance\n" +
                "I'm flying a short distance\n" +
                "I'm flying a short distance\n",turkeyAdapter.Fly());
        }