Search in sources :

Example 51 with InSequence

use of org.jboss.arquillian.junit.InSequence in project deltaspike by apache.

the class TransactionalQueryRunnerTest method should_find_with_lockmode_in_transaction.

@Test
@InSequence(3)
public void should_find_with_lockmode_in_transaction() throws Exception {
    // when
    Simple simple = repository.findByName(NAME);
    // then
    assertNotNull(simple);
    assertTrue(wrapper.isRunInTx());
}
Also used : Simple(org.apache.deltaspike.data.test.domain.Simple) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Example 52 with InSequence

use of org.jboss.arquillian.junit.InSequence in project deltaspike by apache.

the class TransactionalQueryRunnerTest method should_save_in_transaction.

@Test
@InSequence(2)
public void should_save_in_transaction() throws Exception {
    // given
    Simple simple = new Simple(NAME);
    // when
    simple = repository.save(simple);
    // then
    assertNotNull(simple.getId());
    assertTrue(wrapper.isRunInTx());
}
Also used : Simple(org.apache.deltaspike.data.test.domain.Simple) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Example 53 with InSequence

use of org.jboss.arquillian.junit.InSequence in project deltaspike by apache.

the class HouseRepositoryTest method should_run_modifying_in_transaction.

@Test
@InSequence(1)
public void should_run_modifying_in_transaction() throws Exception {
    House house = repository.findByName("Bellevue");
    assertNotNull(house);
    assertNotNull(house.getId());
    assertEquals("Bellevue", house.getName());
    assertTrue(puu.isLoaded(house, "flats"));
    assertFalse(puu.isLoaded(house, "garages"));
}
Also used : House(org.apache.deltaspike.data.test.ee7.domain.House) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Example 54 with InSequence

use of org.jboss.arquillian.junit.InSequence in project deltaspike by apache.

the class HouseRepositoryTest method shouldNotLoadLazyAssociationsWithoutGraph.

@Test
@InSequence(2)
public void shouldNotLoadLazyAssociationsWithoutGraph() throws Exception {
    House house = repository.findOptionalByName("Bellevue");
    assertNotNull(house);
    PersistenceUnitUtil puu = entityManager.getEntityManagerFactory().getPersistenceUnitUtil();
    assertFalse(puu.isLoaded(house, "flats"));
    assertFalse(puu.isLoaded(house, "garages"));
}
Also used : PersistenceUnitUtil(javax.persistence.PersistenceUnitUtil) House(org.apache.deltaspike.data.test.ee7.domain.House) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Example 55 with InSequence

use of org.jboss.arquillian.junit.InSequence in project deltaspike by apache.

the class HouseRepositoryTest method should_build_dynamic_graph_from_paths.

@Test
@InSequence(5)
public void should_build_dynamic_graph_from_paths() throws Exception {
    House house = repository.fetchByNameWithDynamicGraph("Bellevue");
    assertNotNull(house);
    assertTrue(puu.isLoaded(house, "flats"));
    assertTrue(puu.isLoaded(house, "garages"));
    assertEquals(2, house.getFlats().size());
    assertEquals(2, house.getGarages().size());
    Flat flat = house.getFlats().get(0);
    assertFalse(puu.isLoaded(flat, "tenants"));
}
Also used : Flat(org.apache.deltaspike.data.test.ee7.domain.Flat) House(org.apache.deltaspike.data.test.ee7.domain.House) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Aggregations

InSequence (org.jboss.arquillian.junit.InSequence)157 Test (org.junit.Test)157 Faker (com.github.javafaker.Faker)21 Simple (org.apache.deltaspike.data.test.ee7.domain.Simple)18 ModelNode (org.jboss.dmr.ModelNode)14 URL (java.net.URL)13 HttpResponse (org.apache.http.HttpResponse)10 TakeOffer (io.bisq.api.model.TakeOffer)9 HttpGet (org.apache.http.client.methods.HttpGet)8 ModelControllerClient (org.jboss.as.controller.client.ModelControllerClient)8 OfferToCreate (io.bisq.api.model.OfferToCreate)7 RunAsClient (org.jboss.arquillian.container.test.api.RunAsClient)7 PartitionManager (org.picketlink.idm.PartitionManager)7 Response (javax.ws.rs.core.Response)6 IdentityManager (org.picketlink.idm.IdentityManager)6 StringTokenizer (java.util.StringTokenizer)5 RouteBuilder (org.apache.camel.builder.RouteBuilder)5 House (org.apache.deltaspike.data.test.ee7.domain.House)5 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)5 ManagementClient (org.jboss.as.arquillian.container.ManagementClient)5