public void TestMallard() { Duck mallard = new MallardDuck(); Assert.AreEqual("Quack", mallard.quack()); Assert.AreEqual("I'm flying!", mallard.fly()); }
public static void RevisaoPOO1() { Duck duck = new Duck(); MallardDuck mallardDuck = new MallardDuck(); RubberDuck rubberDuck = new RubberDuck(); RedHeadDuck redHeadDuck = new RedHeadDuck(); duck.display(); duck.swim(); mallardDuck.display(); mallardDuck.quack(); mallardDuck.fly(); rubberDuck.display(); rubberDuck.quack(); redHeadDuck.display(); redHeadDuck.fly(); redHeadDuck.quack(); }