@@ -0,0 +1,1731 @@
+package edu.kit.iti.formal.pse.worthwhile.interpreter;%0A%0Aimport static org.junit.Assert.*;%0Aimport java.math.BigInteger;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport edu.kit.iti.formal.pse.worthwhile.common.tests.TestASTProvider;%0Aimport edu.kit.iti.formal.pse.worthwhile.model.ast.Statement;%0A%0Apublic class InterpreterExecutionEventListenerTest %7B%0A%09%0A%09public boolean test;%0A%09public Interpreter interpreter;%0A%09public AbstractExecutionEventListener listener;%0A%09%0A%09@Before%0A%09public void intitialize() %7B%0A%09%09this.interpreter = new Interpreter(TestASTProvider.getRootASTNode(%22Boolean a := true%5Cn%22));%0A%09%09this.test = false;%0A%09%09this.listener = new AbstractExecutionEventListener() %7B%0A%09%09%09public void statementExecuted(Statement statement) %7B%0A%09%09%09%09test = true;%0A%09%09%09%7D%0A%09%09%09public void statementWillExecute(Statement statement) %7B%0A%09%09%09%09test = true;%0A%09%09%09%7D%0A%09%09%09public void executionFailed(Statement statement, InterpreterError error) %7B%0A%09%09%09%09test = true;%0A%09%09%09%7D%0A%09%09%7D;%0A%09%7D%0A%09%0A%09@Test%0A%09public void testStatementExuted() %7B%09%0A%09%09this.interpreter.addExecutionEventHandler(this.listener);%0A%09%09this.interpreter.execute();%0A%09%09assertTrue(this.test);%0A%09%09reset(new Interpreter(TestASTProvider.getRootASTNode(%22Integer a := 5%5Cn%22)), this.listener);%0A%09%09%0A%09%7D%0A%09%0A%09@Test%0A%09public void testStatementWillExecuted() %7B%0A%09%09this.interpreter.addExecutionEventHandler(this.listener);%0A%09%09this.interpreter.execute();%0A%09%09assertTrue(this.test);%0A%09%7D%0A%09%0A%09%0A%09@Test%0A%09public void testExecutionFailed() %7B%09%0A%09%09this.interpreter.addExecutionEventHandler(this.listener);%0A%09%09this.interpreter.execute();%0A%09%09assertTrue(this.test);%0A%09%7D%0A%09%0A%09private void reset(Interpreter inter, AbstractExecutionEventListener listener ) %7B%0A%09%09this.interpreter = inter;%0A%09%09this.interpreter.addExecutionEventHandler(listener);%0A%09%09this.test = false;%0A%09%7D%0A%7D%0A

Add InterpreterExecutionEventListenerTest