Created
June 30, 2013 10:55
-
-
Save ewolff/5894732 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mycompany.myproject.test.integration.java; | |
import static org.junit.Assert.assertTrue; | |
import org.junit.Before; | |
import org.junit.BeforeClass; | |
import org.junit.Test; | |
import org.vertx.testtools.VertxAssert; | |
public class BeforeTest extends org.vertx.testtools.TestVerticle { | |
private static boolean beforeClassExecuted = false; | |
private boolean beforeExecuted = false; | |
@BeforeClass | |
public static void beforeClass() { | |
beforeClassExecuted = true; | |
} | |
@Before | |
public void before() { | |
this.beforeExecuted = true; | |
} | |
@Test | |
public void beforeIsExecuted() { | |
assertTrue(beforeExecuted); | |
VertxAssert.testComplete(); | |
} | |
@Test | |
public void beforeClassIsExecuted() { | |
assertTrue(beforeClassExecuted); | |
VertxAssert.testComplete(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment