本文整理汇总了Java中org.jboss.arquillian.persistence.ShouldMatchDataSet类的典型用法代码示例。如果您正苦于以下问题:Java ShouldMatchDataSet类的具体用法?Java ShouldMatchDataSet怎么用?Java ShouldMatchDataSet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ShouldMatchDataSet类属于org.jboss.arquillian.persistence包,在下文中一共展示了ShouldMatchDataSet类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: shouldCreateEntity
import org.jboss.arquillian.persistence.ShouldMatchDataSet; //导入依赖的package包/类
@Test
@ShouldMatchDataSet("datasets/after_create.xml")
@InSequence(2)
public void shouldCreateEntity() throws Exception { // <4>
MyEntity myentity = new MyEntity("Some Key", "Some Value");
em.persist(myentity);
}
示例2: shouldUpdateEntity
import org.jboss.arquillian.persistence.ShouldMatchDataSet; //导入依赖的package包/类
@Test
@UsingDataSet("datasets/before_update.xml")
@ShouldMatchDataSet("datasets/after_update.xml")
@InSequence(2)
public void shouldUpdateEntity() throws Exception { // <5>
MyEntity myentity = em.find(MyEntity.class, "Key 1");
myentity.setValue("Another Value 1");
}
示例3: shouldMakeACleanup
import org.jboss.arquillian.persistence.ShouldMatchDataSet; //导入依赖的package包/类
@Test
@UsingDataSet("datasets/seats.yml")
@ShouldMatchDataSet("datasets/expected-seats.yml")
public void shouldMakeACleanup() throws Exception {
// given
// from annotation
// when
ticketService.doCleanUp();
// then
// from annotation
}
示例4: save_NewSchedule_ShouldBeCreated
import org.jboss.arquillian.persistence.ShouldMatchDataSet; //导入依赖的package包/类
@Test
@UsingDataSet(value = {"guests.json","sectors.json", "flight.json"})
@ShouldMatchDataSet(value = {"schedule.yml"}, excludeColumns = {"id"})
public void save_NewSchedule_ShouldBeCreated() throws Exception {
Guest guest = guestService.find(Guest.class, 1);
Flight flight = flightService.find(Flight.class, 1);
Schedule saved = scheduleService.create(createSchedule(flight, guest));
assertNotNull(saved);
assertNotNull(saved.getId());
}
示例5: shouldUpdateSchedule
import org.jboss.arquillian.persistence.ShouldMatchDataSet; //导入依赖的package包/类
@Test
@UsingDataSet(value = {"schedule.yml","guests.json","sectors.json", "flight.json"})
@ShouldMatchDataSet(value = {"schedule_updated.yml"}, excludeColumns = {"id"})
public void shouldUpdateSchedule(){
Schedule schedule = scheduleService.find(Schedule.class, 1);
schedule.setScheduleDate(LocalDate.of(2016,9,14));
scheduleService.edit(schedule);
}
示例6: get_ExistingSchedule_Found
import org.jboss.arquillian.persistence.ShouldMatchDataSet; //导入依赖的package包/类
@Test
@UsingDataSet(value = {"schedule.yml","guests.json","sectors.json", "flight.json"})
@ShouldMatchDataSet(value = {"schedule.yml"}, excludeColumns = {"id"})
public void get_ExistingSchedule_Found() throws Exception {
Schedule schedule = scheduleService.find(Schedule.class, 1);
assertNotNull(schedule);
}
示例7: save_NewItinerary_ShouldBeCreated
import org.jboss.arquillian.persistence.ShouldMatchDataSet; //导入依赖的package包/类
@Test
@UsingDataSet(value = {"schedule.yml","guests.json","sectors.json", "flight.json"})
@ShouldMatchDataSet(value = {"itinerary.yml"}, excludeColumns = {"id"})
public void save_NewItinerary_ShouldBeCreated() throws Exception {
Guest guest = guestService.find(Guest.class, 1);
Flight flight = flightService.find(Flight.class, 1);
Schedule schedule = scheduleService.find(Schedule.class, 1);
Itinerary saved = itineraryService.createItinerary(createItinerary(flight, guest, schedule));
assertNotNull(saved);
assertNotNull(saved.getId());
}
示例8: get_ExistingItinerary_Found
import org.jboss.arquillian.persistence.ShouldMatchDataSet; //导入依赖的package包/类
@Test
@UsingDataSet(value = {"itinerary.yml","schedule.yml","guests.json","sectors.json", "flight.json"})
@ShouldMatchDataSet(value = {"itinerary.yml"}, excludeColumns = {"id"})
public void get_ExistingItinerary_Found() throws Exception {
Itinerary itinerary = itineraryService.find(Itinerary.class, 1);
assertNotNull(itinerary);
}
示例9: save_NewGuest_ShouldBeCreated
import org.jboss.arquillian.persistence.ShouldMatchDataSet; //导入依赖的package包/类
@Test
@ShouldMatchDataSet(value = { "guest.json" }, excludeColumns = { "id" })
public void save_NewGuest_ShouldBeCreated() throws Exception {
Guest saved = guestService.create(createGuest());
assertNotNull(saved);
assertNotNull(saved.getId());
}
示例10: shouldUpdateGuest
import org.jboss.arquillian.persistence.ShouldMatchDataSet; //导入依赖的package包/类
@Test
@UsingDataSet(value = { "guest.json" })
@ShouldMatchDataSet(value = { "guest_updated.json" }, excludeColumns = { "id" })
public void shouldUpdateGuest(){
Guest guest = guestService.find(Guest.class, 1);
guest.setFirstname("James");
guest.setLastname("Gosling");
guestService.edit(guest);
}
示例11: get_ExistingGuest_Found
import org.jboss.arquillian.persistence.ShouldMatchDataSet; //导入依赖的package包/类
@Test
@UsingDataSet(value = { "guest.json" })
@ShouldMatchDataSet(value = { "guest.json" }, excludeColumns = { "id" })
public void get_ExistingGuest_Found() throws Exception {
Guest guest = guestService.find(Guest.class, 1);
assertNotNull(guest);
}
示例12: save_NewFlight_ShouldBeCreated
import org.jboss.arquillian.persistence.ShouldMatchDataSet; //导入依赖的package包/类
@Test
@UsingDataSet(value = {"sectors.json"})
@ShouldMatchDataSet(value = {"flight.json"}, excludeColumns = {"id"})
public void save_NewFlight_ShouldBeCreated() throws Exception {
Sector sourceSector = sectorService.find(Sector.class, 1);
Sector destSector = sectorService.find(Sector.class, 3);
Flight saved = flightService.create(createFlight(destSector, sourceSector));
assertNotNull(saved);
assertNotNull(saved.getId());
}
示例13: get_ExistingFlight_Found
import org.jboss.arquillian.persistence.ShouldMatchDataSet; //导入依赖的package包/类
@Test
@UsingDataSet(value = {"sectors.json", "flight.json"})
@ShouldMatchDataSet(value = {"flight.json"}, excludeColumns = {"id"})
public void get_ExistingFlight_Found() throws Exception {
Flight flight = flightService.find(Flight.class, 1);
assertNotNull(flight);
}
示例14: save_NewSector_ShouldBeCreated
import org.jboss.arquillian.persistence.ShouldMatchDataSet; //导入依赖的package包/类
@Test
@ShouldMatchDataSet(value = {"sector.json"}, excludeColumns = {"id"})
public void save_NewSector_ShouldBeCreated() throws Exception {
Sector saved = sectorService.create(createSector());
assertNotNull(saved);
assertNotNull(saved.getId());
}
示例15: shouldUpdateSector
import org.jboss.arquillian.persistence.ShouldMatchDataSet; //导入依赖的package包/类
@Test
@UsingDataSet(value = {"sector.json"})
@ShouldMatchDataSet(value = {"sector_updated.json"}, excludeColumns = {"id"})
public void shouldUpdateSector(){
Sector sector = sectorService.find(Sector.class, 1);
sector.setSector("DEL");
sectorService.edit(sector);
}