Fix it some changes

This commit is contained in:
Meysam Tamkin 2020-09-03 10:16:45 +04:30
parent d8d2ecc4b4
commit 3146226399
1 changed files with 5 additions and 3 deletions

View File

@ -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);
} }
} }