use of org.jboss.arquillian.junit.InSequence in project javaee7-samples by javaee-samples.
the class AnnotatedSingletonResourceTest method testPost.
@Test
@InSequence(1)
public void testPost() {
target.request().post(Entity.text("pineapple"));
target.request().post(Entity.text("mango"));
target.request().post(Entity.text("kiwi"));
target.request().post(Entity.text("passion fruit"));
String list = target.request().get(String.class);
System.out.println("--> " + list);
StringTokenizer tokens = new StringTokenizer(list, ",");
assertEquals(4, tokens.countTokens());
}
use of org.jboss.arquillian.junit.InSequence in project javaee7-samples by javaee-samples.
the class AnnotatedSingletonResourceTest method testDelete.
@Test
@InSequence(3)
public void testDelete() {
target.path("kiwi").request().delete();
String list = target.request().get(String.class);
StringTokenizer tokens = new StringTokenizer(list, ",");
assertEquals(3, tokens.countTokens());
}
use of org.jboss.arquillian.junit.InSequence in project javaee7-samples by javaee-samples.
the class ApplicationSingletonResourceTest method testPut.
@Test
@InSequence(4)
public void testPut() {
target.request().put(Entity.text("apple"));
String list = target.request().get(String.class);
StringTokenizer tokens = new StringTokenizer(list, ",");
assertEquals(4, tokens.countTokens());
}
use of org.jboss.arquillian.junit.InSequence in project javaee7-samples by javaee-samples.
the class ApplicationSingletonResourceTest method testPost.
@Test
@InSequence(1)
public void testPost() {
target.request().post(Entity.text("pineapple"));
target.request().post(Entity.text("mango"));
target.request().post(Entity.text("kiwi"));
target.request().post(Entity.text("passion fruit"));
String list = target.request().get(String.class);
StringTokenizer tokens = new StringTokenizer(list, ",");
assertEquals(4, tokens.countTokens());
}
use of org.jboss.arquillian.junit.InSequence in project javaee7-samples by javaee-samples.
the class FileWatcherTest method should_react_on_new_text_file_arriving_in_the_folder.
@Test
@InSequence(1)
public void should_react_on_new_text_file_arriving_in_the_folder() throws Exception {
// given
File tempFile = new File("/tmp", "test.txt");
tempFile.createNewFile();
tempFile.deleteOnExit();
// when
await().atMost(TEN_SECONDS).with().pollInterval(FIVE_HUNDRED_MILLISECONDS).until(fileEventObserved());
// then
assertThat(tempFile.getName()).isEqualTo(observedFileEvent.getFile().getName());
assertThat(FileEvent.Type.CREATED).isEqualTo(observedFileEvent.getType());
}
Aggregations