@Test(dependsOnMethods = "readRegionOffice") public void updateRegionOffice() { repo = ctx.getBean(RegionOfficeRepository.class); RegionOffice office = repo.findOne(id); // updating RegionOffice updateOffice = new RegionOffice.Builder("EC8085") .regionOffice(office) .officeName("Southern Afriva VW") .build(); repo.save(updateOffice); Assert.assertEquals(updateOffice.getOfficeName(), "Southern Afriva VW"); }
@Test(dependsOnMethods = "createRegionOffice") public void readRegionOffice() { repo = ctx.getBean(RegionOfficeRepository.class); RegionOffice office = repo.findOne(id); Assert.assertEquals(office.getOfficeName(), "VW_Southern Africa"); }