@Test public void selectAll_ShouldReturnOneResult() { // setup initUserRaceDate(); // action List<UserRace> UserRaces = userRaceDao.selectAll(); // assert Assert.assertNotNull("list of UserRaces should'nt be null", UserRaces); Assert.assertEquals("List of UserRaces should contain 1 result", 1, UserRaces.size()); }
@Test public void create_ShouldReturnOne() { // set up UserRace myUserRace = new UserRace(); myUserRace.setVrUserId(TEST_VR_USER_ID); myUserRace.setRaceId(TEST_RACE_ID); myUserRace.setMode(TEST_MODE); myUserRace.setUserService(TEST_USER_SERVICE); myUserRace.setZezoUrlTemplate(TEST_ZEZO_URL_TEMPLATE); UserRace myUserRace2 = myUserRace.clone(); myUserRace2.setRaceId(2); // action int result = userRaceDao.create(myUserRace); // assert Assert.assertEquals(1, result); }