transcendental-lisp/test/testutil/SymbolAndFunctionCleaner.java

37 lines
751 B
Java
Raw Normal View History

package testutil;
import static table.FunctionTable.resetFunctionTable;
2017-11-12 09:42:25 -05:00
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() {}
}