diff --git a/monticore-grammar/src/test/java/de/monticore/statements/prettyprint/MCAssertStatementsPrettyPrinterTest.java b/monticore-grammar/src/test/java/de/monticore/statements/prettyprint/MCAssertStatementsPrettyPrinterTest.java index 76a3286c54..4888eb8c87 100644 --- a/monticore-grammar/src/test/java/de/monticore/statements/prettyprint/MCAssertStatementsPrettyPrinterTest.java +++ b/monticore-grammar/src/test/java/de/monticore/statements/prettyprint/MCAssertStatementsPrettyPrinterTest.java @@ -6,16 +6,18 @@ import de.monticore.statements.testmcassertstatements._parser.TestMCAssertStatementsParser; import de.se_rwth.commons.logging.Log; import de.se_rwth.commons.logging.LogStub; -import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import java.io.IOException; import java.util.Optional; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + public class MCAssertStatementsPrettyPrinterTest { - private TestMCAssertStatementsParser parser = new TestMCAssertStatementsParser(); + private TestMCAssertStatementsParser parser; @BeforeEach public void init() { @@ -29,18 +31,18 @@ public void init() { @Test public void testAssertStatement() throws IOException { Optional result = parser.parse_StringAssertStatement("assert a : b;"); - Assertions.assertFalse(parser.hasErrors()); - Assertions.assertTrue(result.isPresent()); + assertFalse(parser.hasErrors()); + assertTrue(result.isPresent()); ASTAssertStatement ast = result.get(); String output = TestMCAssertStatementsMill.prettyPrint(ast, true); result = parser.parse_StringAssertStatement(output); - Assertions.assertFalse(parser.hasErrors()); - Assertions.assertTrue(result.isPresent()); + assertFalse(parser.hasErrors()); + assertTrue(result.isPresent()); + + assertTrue(ast.deepEquals(result.get())); - Assertions.assertTrue(ast.deepEquals(result.get())); - - Assertions.assertTrue(Log.getFindings().isEmpty()); + assertTrue(Log.getFindings().isEmpty()); } }