Skip to content

Instantly share code, notes, and snippets.

@ewolff
Created June 30, 2013 10:55
Show Gist options
  • Save ewolff/5894732 to your computer and use it in GitHub Desktop.
Save ewolff/5894732 to your computer and use it in GitHub Desktop.
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