Examples of GingerQuack


Examples of com.visionarysoftwaresolutions.hfdpch1.tddstyle.quacks.GingerQuack

public class RedheadDuck extends Duck{
 
  public RedheadDuck(){
    flyBehavior = new FlyWithWings();
    quackBehavior = new GingerQuack();
  }
View Full Code Here

Examples of com.visionarysoftwaresolutions.hfdpch1.tddstyle.quacks.GingerQuack

 
  @Test
  public void testCorrectQuack() {
    //Given: You have a quack behavior
    //When: It is set to GingerQuack
    QuackBehavior quackbehavior = new GingerQuack();
    //Then: The quack behavior should demonstrate the correct quacking
    String expected = "Quack! (But with a dash of ginger...)";
    assertEquals(expected, quackbehavior.quack());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.