示例#1
0
 @Test
 public void shouldInsertIntoDB() throws Exception {
   carpoolBuddyDao.insert(carpoolBuddy, carpool);
   assertThat(
       carpoolBuddyDao.getCarpoolBuddiesByCarpoolName(carpool.getName()).contains(carpoolBuddy),
       equalTo(true));
   carpoolBuddyDao.remove(carpoolBuddy.getBuddy().getUserName(), carpool.getName());
 }
示例#2
0
 @Test
 public void shouldGetCarpoolBuddyFormUserNameAndCarpoolName() throws Exception {
   carpoolBuddyDao.insert(carpoolBuddy, carpool);
   CarpoolBuddy carpoolBuddyActual =
       carpoolBuddyDao.getCarpoolBuddyFromUsernameAndCarpoolName(
           buddy.getUserName(), carpool.getName());
   assertEquals(carpoolBuddy, carpoolBuddyActual);
   carpoolBuddyDao.remove(buddy.getUserName(), carpool.getName());
 }