Cleaned up some code

This commit is contained in:
Mike Cifelli 2017-02-26 12:39:08 -05:00
parent e51d275b76
commit 49e145d098
5 changed files with 19 additions and 17 deletions

View File

@ -29,8 +29,8 @@ public interface LispInterpreterBuilder {
void setCriticalOutputDecorator(Function<String, String> criticalOutputDecorator);
default void reset() {}
LispInterpreter build();
default void reset() {}
}

View File

@ -68,6 +68,7 @@ public class LispInterpreterBuilderTester {
builder.build();
}
@Test
public void interpreterAlreadyBuiltException_HasMessage() {
InterpreterAlreadyBuiltException e = new InterpreterAlreadyBuiltException();
@ -75,4 +76,13 @@ public class LispInterpreterBuilderTester {
assertTrue(e.getMessage().length() > 0);
}
@Test(expected = InterpreterAlreadyBuiltException.class)
public void resetNormallyDoesNothing() {
builder = new LispInterpreterBuilderImpl();
builder.build();
builder.reset();
builder.build();
}
}

View File

@ -1,10 +1,7 @@
package main;
import static org.junit.Assert.*;
import org.junit.*;
public class MainTester {
@Before
@ -13,9 +10,4 @@ public class MainTester {
@After
public void tearDown() throws Exception {}
@Test
public void test() {
fail("Not yet implemented");
}
}