BAEL-4341 - Add AfterEach annotation instead of BeforeEach on tearDown

method
This commit is contained in:
Jonathan Cook 2020-08-13 09:12:53 +02:00
parent 7cab9186b4
commit bc2352684a
1 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import org.junit.Assert;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@ -19,7 +20,7 @@ class SystemOutPrintlnUnitTest {
System.setOut(new PrintStream(outputStreamCaptor));
}
@BeforeEach
@AfterEach
public void tearDown() {
System.setOut(standardOut);
}