Fix it some changes

This commit is contained in:
Meysam Tamkin
2020-09-07 13:35:07 +04:30
parent 3146226399
commit d994a5bdbf
@@ -0,0 +1,27 @@
package com.baeldung.junit5.nonstatic;
import org.junit.jupiter.api.*;
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
public class BeforeAndAfterAnnotationsUnitTest {
String input;
Long result;
@BeforeAll
public void setup() {
input = "77";
}
@AfterAll
public void teardown() {
input = null;
result = null;
}
@Test
public void whenConvertStringToLong_thenResultShouldBeLong() {
result = Long.valueOf(input);
Assertions.assertEquals(77l, result);
}
}