当前位置: 首页>>代码示例>>Java>>正文


Java ShouldMatchDataSet类代码示例

本文整理汇总了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);
}
 
开发者ID:robertpanzer,项目名称:persistence-test,代码行数:8,代码来源:PersistenceTest.java

示例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");
}
 
开发者ID:robertpanzer,项目名称:persistence-test,代码行数:9,代码来源:PersistenceTest.java

示例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
}
 
开发者ID:packt-wildfly,项目名称:packt-java-ee-7-code-samples,代码行数:14,代码来源:TicketServiceTest.java

示例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());
}
 
开发者ID:ecabrerar,项目名称:AirAlliance,代码行数:14,代码来源:ScheduleServiceTest.java

示例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);
}
 
开发者ID:ecabrerar,项目名称:AirAlliance,代码行数:12,代码来源:ScheduleServiceTest.java

示例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);
}
 
开发者ID:ecabrerar,项目名称:AirAlliance,代码行数:9,代码来源:ScheduleServiceTest.java

示例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());
}
 
开发者ID:ecabrerar,项目名称:AirAlliance,代码行数:15,代码来源:ItineraryServiceTest.java

示例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);
}
 
开发者ID:ecabrerar,项目名称:AirAlliance,代码行数:9,代码来源:ItineraryServiceTest.java

示例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());
}
 
开发者ID:ecabrerar,项目名称:AirAlliance,代码行数:10,代码来源:GuestServiceTest.java

示例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);

}
 
开发者ID:ecabrerar,项目名称:AirAlliance,代码行数:13,代码来源:GuestServiceTest.java

示例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);
}
 
开发者ID:ecabrerar,项目名称:AirAlliance,代码行数:9,代码来源:GuestServiceTest.java

示例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());
}
 
开发者ID:ecabrerar,项目名称:AirAlliance,代码行数:15,代码来源:FlightServiceTest.java

示例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);
}
 
开发者ID:ecabrerar,项目名称:AirAlliance,代码行数:9,代码来源:FlightServiceTest.java

示例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());
}
 
开发者ID:ecabrerar,项目名称:AirAlliance,代码行数:10,代码来源:SectorServiceTest.java

示例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);
}
 
开发者ID:ecabrerar,项目名称:AirAlliance,代码行数:11,代码来源:SectorServiceTest.java


注:本文中的org.jboss.arquillian.persistence.ShouldMatchDataSet类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。