Add some changes
This commit is contained in:
parent
0ca42d7d8c
commit
d8d2ecc4b4
@ -0,0 +1,25 @@
|
|||||||
|
package com.baeldung.junit5.nonstatic;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.*;
|
||||||
|
|
||||||
|
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||||
|
public class BeforeAfterAllNonStaticTest {
|
||||||
|
|
||||||
|
String input;
|
||||||
|
Long result;
|
||||||
|
|
||||||
|
@BeforeAll
|
||||||
|
public void setup() {
|
||||||
|
input = "77";
|
||||||
|
}
|
||||||
|
|
||||||
|
@AfterAll
|
||||||
|
public void teardown() {
|
||||||
|
Assertions.assertEquals(77l, result);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testConvertStringToLong() {
|
||||||
|
result = Long.valueOf(input);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user