Clean up code

This commit is contained in:
Mike Cifelli 2017-03-24 09:36:44 -04:00
parent eb82a25f64
commit a8620307c9
7 changed files with 8 additions and 14 deletions

View File

@ -31,7 +31,7 @@ public class FilePositionTrackerTest {
}
@Before
public void setUp() throws Exception {
public void setUp() {
trackerUnderTest = new FilePositionTracker(FILE_NAME);
}

View File

@ -24,7 +24,7 @@ public class ArgumentValidatorTest {
}
@Before
public void setUp() throws Exception {
public void setUp() {
validator = new ArgumentValidator("TEST");
}

View File

@ -52,7 +52,7 @@ public class LispInterpreterTest {
}
@Before
public void setUp() throws Exception {
public void setUp() {
indicatorSet = new HashSet<>();
outputStream = new ByteArrayOutputStream();
errorOutputStream = new ByteArrayOutputStream();
@ -61,7 +61,7 @@ public class LispInterpreterTest {
}
@After
public void tearDown() throws Exception {
public void tearDown() {
builder.reset();
environment.reset();
}

View File

@ -7,7 +7,7 @@ import static testutil.TestUtilities.*;
import java.math.BigInteger;
import org.junit.*;
import org.junit.Test;
import function.UserDefinedFunction;
import sexpression.LispNumber.InvalidNumberException;
@ -18,9 +18,6 @@ public class SExpressionTest {
assertEquals(expected, sExpression.toString());
}
@Before
public void setUp() throws Exception {}
@Test
public void nil_ToString() {
String input = "NIL";

View File

@ -11,14 +11,11 @@ public class SafeInputStreamTest {
SafeInputStream safeWithException;
@Before
public void setUp() throws Exception {
public void setUp() {
safe = new SafeInputStream(createInputStreamFromString("a"));
safeWithException = new SafeInputStream(createIOExceptionThrowingInputStream());
}
@After
public void tearDown() throws Exception {}
@Test
public void readWorks() {
assertEquals('a', (char) safe.read());

View File

@ -14,7 +14,7 @@ public class SafeOutputStreamTest {
ByteArrayOutputStream output;
@Before
public void setUp() throws Exception {
public void setUp() {
output = new ByteArrayOutputStream();
safe = new SafeOutputStream(output);
safeWithException = new SafeOutputStream(createIOExceptionThrowingOutputStream());

View File

@ -14,7 +14,7 @@ public class TokenFactoryTest {
private FilePosition testPosition;
@Before
public void setUp() throws Exception {
public void setUp() {
tokenFactory = new TokenFactoryImpl();
testPosition = new FilePosition("testFile");
testPosition.setLineNumber(0);