transcendental-lisp/test/testutil/SymbolAndFunctionCleaner.java

37 lines
751 B
Java

package testutil;
import static table.FunctionTable.resetFunctionTable;
import org.junit.After;
import org.junit.Before;
import table.ExecutionContext;
public abstract class SymbolAndFunctionCleaner {
protected ExecutionContext executionContext;
public SymbolAndFunctionCleaner() {
this.executionContext = ExecutionContext.getInstance();
}
@Before
public final void setUp() {
executionContext.clearContext();
resetFunctionTable();
additionalSetUp();
}
@After
public final void tearDown() {
executionContext.clearContext();
resetFunctionTable();
additionalTearDown();
}
public void additionalSetUp() {}
public void additionalTearDown() {}
}