Closed aliokan closed 6 years ago
With hexUnit 0.35.0
import hex.unittest.assertion.Assert; class FixtureTest { @Before function setup() { trace("@Before"); } @After function tearDown() { trace("@After"); } @BeforeClass function beforeClass() { trace("@BeforeClass"); } @AfterClass function afterClass() { trace("@AfterClass"); } @Test("empty test") function emptyTest() { Assert.isTrue(true); } @Test("empty test 2") function emptyTest2() { Assert.isTrue(true); } @Test("empty test 3") function emptyTest3() { Assert.isTrue(true); } }
Result:
ConsoleNotifier.hx:47: <<< Start FixtureTest tests run >>> ConsoleNotifier.hx:76: Test class 'FixtureTest' FixtureTest.hx:8: @Before ConsoleNotifier.hx:93: * [emptyTest] empty test 0ms FixtureTest.hx:14: @After FixtureTest.hx:8: @Before ConsoleNotifier.hx:93: * [emptyTest2] empty test 2 0ms FixtureTest.hx:14: @After FixtureTest.hx:8: @Before ConsoleNotifier.hx:93: * [emptyTest3] empty test 3 0ms FixtureTest.hx:14: @After ConsoleNotifier.hx:54: <<< End tests run >>> ConsoleNotifier.hx:55: Assertions passed: 3
Where are my @BeforeClass and @AfterClass calls? ;)
@BeforeClass
@AfterClass
It working, @BeforeClass and @AfterClass should be applied on static method!
With hexUnit 0.35.0
Result:
Where are my
@BeforeClass
and@AfterClass
calls? ;)