Fix it some changes
This commit is contained in:
parent
d8d2ecc4b4
commit
3146226399
|
@ -3,7 +3,7 @@ package com.baeldung.junit5.nonstatic;
|
||||||
import org.junit.jupiter.api.*;
|
import org.junit.jupiter.api.*;
|
||||||
|
|
||||||
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||||
public class BeforeAfterAllNonStaticTest {
|
public class BeforeAndAfterAnnotationsUnitTest {
|
||||||
|
|
||||||
String input;
|
String input;
|
||||||
Long result;
|
Long result;
|
||||||
|
@ -15,11 +15,13 @@ public class BeforeAfterAllNonStaticTest {
|
||||||
|
|
||||||
@AfterAll
|
@AfterAll
|
||||||
public void teardown() {
|
public void teardown() {
|
||||||
Assertions.assertEquals(77l, result);
|
input = null;
|
||||||
|
result = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testConvertStringToLong() {
|
public void whenConvertStringToLong_thenResultShouldBeLong() {
|
||||||
result = Long.valueOf(input);
|
result = Long.valueOf(input);
|
||||||
|
Assertions.assertEquals(77l, result);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue