transcendental-lisp/test/testutil/SymbolAndFunctionCleaner.java

36 lines
722 B
Java
Raw Normal View History

package testutil;
import static table.FunctionTable.resetFunctionTable;
import org.junit.*;
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() {}
}