diff --git a/src/main/java/com/alcatrazescapee/mcjunitlib/framework/IntegrationTestManager.java b/src/main/java/com/alcatrazescapee/mcjunitlib/framework/IntegrationTestManager.java index f889980..a4e5863 100644 --- a/src/main/java/com/alcatrazescapee/mcjunitlib/framework/IntegrationTestManager.java +++ b/src/main/java/com/alcatrazescapee/mcjunitlib/framework/IntegrationTestManager.java @@ -34,6 +34,7 @@ import com.alcatrazescapee.mcjunitlib.framework.mod.ForgeEventHandler; import org.objectweb.asm.Type; +import org.opentest4j.AssertionFailedError; /** * Main handler for integration tests @@ -132,6 +133,12 @@ private static IntegrationTestRunner createIntegrationTest(String modId, ModFile LOGGER.debug("Error", e); helper.fail("Reflection Error: " + e.getMessage()); } + catch(AssertionFailedError a) { + LOGGER.debug("Assertion Error: " + a.getMessage()); + helper.fail("Assertion Error: " + a.getMessage()); + if(a.isExpectedDefined() && a.isActualDefined()) + helper.fail("Expected <" + a.getExpected() + "> but got <" + a.getActual() + ">."); + } }, testMethodName, templateName, typedAnnotation.refreshTicks(), typedAnnotation.timeoutTicks()); } catch (ClassNotFoundException | NoSuchMethodException | InstantiationException | IllegalAccessException e)