示例#1
0
  @org.testng.annotations.Test
  public void updateRental() {
    Rental rent = RentalFactory.createRental("5/6/2015", "5/7/2015", null, 0.00);

    Rental rentcopy = RentalFactory.createRental("5/6/2015", "5/7/2015", "7/7/2015", 25.00);

    Assert.assertEquals("5/6/2015", rent.getRentalDate());
    Assert.assertEquals("5/6/2015", rentcopy.getRentalDate());
    Assert.assertEquals("5/7/2015", rent.getDueDate());
    Assert.assertEquals("5/7/2015", rentcopy.getDueDate());
    Assert.assertNull(rent.getReturnDate());
    Assert.assertEquals("7/7/2015", rentcopy.getReturnDate());
  }
示例#2
0
 @org.testng.annotations.Test
 public void createRental() {
   Rental rent = RentalFactory.createRental("5/6/2015", "5/7/2015", null, 0.00);
   Assert.assertEquals("5/6/2015", rent.getRentalDate());
 }