示例#1
0
  @Test
  public void givenValuesToPlayerConstructorThenValuesAreSetForPlayer() {
    String name = "Bob";
    LotteryTicket ticket = new LotteryTicket(13);

    Player player = new Player(name, ticket);

    assertEquals(name, player.getName());
    assertEquals(ticket, player.getTicketNumber());
  }
示例#2
0
 /** Test of getName method, of class Player. */
 @Test
 public void testGetName() {
   System.out.println("getName");
   Player instance = null;
   String expResult = "";
   String result = instance.getName();
   assertEquals(expResult, result);
   // TODO review the generated test code and remove the default call to fail.
   fail("The test case is a prototype.");
 }