Swap these 2 arguments, so they are in the correct order: expected value, actual value

This commit is contained in:
Alex Golub 2022-04-22 21:23:47 +03:00
parent e0bdd5a62d
commit 8861efd87a
3 changed files with 6 additions and 6 deletions

View File

@ -29,6 +29,6 @@ public class AlphanumericOrderUnitTest {
@AfterAll @AfterAll
public static void assertOutput() { public static void assertOutput() {
assertEquals(output.toString(), "ABa"); assertEquals("ABa", output.toString());
} }
} }

View File

@ -9,7 +9,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
@TestMethodOrder(CustomOrder.class) @TestMethodOrder(CustomOrder.class)
public class CustomOrderUnitTest { public class CustomOrderUnitTest {
private static StringBuilder output = new StringBuilder(""); private static final StringBuilder output = new StringBuilder("");
@Test @Test
void myATest() { void myATest() {
@ -26,9 +26,8 @@ public class CustomOrderUnitTest {
output.append("a"); output.append("a");
} }
@AfterAll @AfterAll
public static void assertOutput() { public static void assertOutput() {
assertEquals(output.toString(), "AaB"); assertEquals("AaB", output.toString());
} }
} }

View File

@ -7,7 +7,8 @@ import static org.junit.jupiter.api.Assertions.*;
@TestMethodOrder(OrderAnnotation.class) @TestMethodOrder(OrderAnnotation.class)
public class OrderAnnotationUnitTest { public class OrderAnnotationUnitTest {
private static StringBuilder output = new StringBuilder("");
private static final StringBuilder output = new StringBuilder();
@Test @Test
@Order(1) @Order(1)
@ -29,6 +30,6 @@ public class OrderAnnotationUnitTest {
@AfterAll @AfterAll
public static void assertOutput() { public static void assertOutput() {
assertEquals(output.toString(), "abc"); assertEquals("abc", output.toString());
} }
} }