use of org.jboss.arquillian.junit.InSequence in project deltaspike by apache.
the class JtaTransactionalRepositoryAbstractTest method should_save_when_app_scoped_bean_is_found.
@Test
@InSequence(21)
public void should_save_when_app_scoped_bean_is_found() throws Exception {
// when
Simple simple = simpleClientApp.createSimple("application scoped");
Simple found = repository.findOptionalByName("application scoped");
// then
assertNotNull(simple);
assertNotNull(found);
assertEquals("application scoped", found.getName());
}
use of org.jboss.arquillian.junit.InSequence in project deltaspike by apache.
the class JtaTransactionalRepositoryAbstractTest 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());
}
use of org.jboss.arquillian.junit.InSequence in project deltaspike by apache.
the class JtaTransactionalRepositoryAbstractTest method should_find_with_lockmode_in_transaction.
@Test
@InSequence(3)
public void should_find_with_lockmode_in_transaction() throws Exception {
// when
Simple simple = repository.findOptionalByName(NAME);
// then
assertNotNull(simple);
assertTrue(wrapper.isRunInTx());
}
use of org.jboss.arquillian.junit.InSequence in project deltaspike by apache.
the class RequestResponseEventsTest method sendRequest.
@Test
@RunAsClient
@InSequence(2)
public void sendRequest(@ArquillianResource URL contextPath) throws Exception {
String url = new URL(contextPath, "foobar.txt").toString();
HttpResponse response = new DefaultHttpClient().execute(new HttpGet(url));
assertEquals(200, response.getStatusLine().getStatusCode());
}
use of org.jboss.arquillian.junit.InSequence in project deltaspike by apache.
the class SessionEventsTest method sendRequestToCreateSession.
/**
* Now send a request which creates a session
*/
@Test
@RunAsClient
@InSequence(3)
public void sendRequestToCreateSession(@ArquillianResource URL contextPath) throws Exception {
String url = new URL(contextPath, "create-session").toString();
HttpResponse response = client.execute(new HttpGet(url));
assertEquals(200, response.getStatusLine().getStatusCode());
EntityUtils.consumeQuietly(response.getEntity());
}
Aggregations