Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

Commit

Permalink
Add @insequence to Before/After test case.
Browse files Browse the repository at this point in the history
Test checks that the After phase was called on the previous Test
so it has to be executed as the second test.
  • Loading branch information
aslakknutsen committed Jul 2, 2012
1 parent 306451a commit 6472c62
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -23,6 +23,7 @@
import org.jboss.arquillian.container.openwebbeans.embedded_1.beans.MyBean;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.arquillian.junit.InSequence;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
Expand Down Expand Up @@ -76,13 +77,13 @@ public void shouldExecuteAfter() throws Exception
afterCalled = true;
}

@Test
@Test @InSequence(1)
public void shouldBeAbleToReadSetVariableFromBeforePhase() throws Exception
{
Assert.assertEquals("@Before method should have been executed", "aslak", name);
}

@Test
@Test @InSequence(2)
public void shouldBeAbleToReadSetVariableFromAfterPhase() throws Exception
{
Assert.assertTrue("@After method should have been executed(previous @Test)", afterCalled);
Expand Down

0 comments on commit 6472c62

Please sign in to comment.