diff --git a/test/file/FilePositionTrackerTest.java b/test/file/FilePositionTrackerTest.java index 3af06c0..5358c62 100644 --- a/test/file/FilePositionTrackerTest.java +++ b/test/file/FilePositionTrackerTest.java @@ -31,7 +31,7 @@ public class FilePositionTrackerTest { } @Before - public void setUp() throws Exception { + public void setUp() { trackerUnderTest = new FilePositionTracker(FILE_NAME); } diff --git a/test/function/ArgumentValidatorTest.java b/test/function/ArgumentValidatorTest.java index 4c42637..fa3e2f6 100644 --- a/test/function/ArgumentValidatorTest.java +++ b/test/function/ArgumentValidatorTest.java @@ -24,7 +24,7 @@ public class ArgumentValidatorTest { } @Before - public void setUp() throws Exception { + public void setUp() { validator = new ArgumentValidator("TEST"); } diff --git a/test/interpreter/LispInterpreterTest.java b/test/interpreter/LispInterpreterTest.java index ced41f2..5e99f24 100644 --- a/test/interpreter/LispInterpreterTest.java +++ b/test/interpreter/LispInterpreterTest.java @@ -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(); } diff --git a/test/sexpression/SExpressionTest.java b/test/sexpression/SExpressionTest.java index 5f6530f..d1e2072 100644 --- a/test/sexpression/SExpressionTest.java +++ b/test/sexpression/SExpressionTest.java @@ -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"; diff --git a/test/stream/SafeInputStreamTest.java b/test/stream/SafeInputStreamTest.java index ce775e1..25fecbf 100644 --- a/test/stream/SafeInputStreamTest.java +++ b/test/stream/SafeInputStreamTest.java @@ -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()); diff --git a/test/stream/SafeOutputStreamTest.java b/test/stream/SafeOutputStreamTest.java index dcec94f..f0ff411 100644 --- a/test/stream/SafeOutputStreamTest.java +++ b/test/stream/SafeOutputStreamTest.java @@ -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()); diff --git a/test/token/TokenFactoryTest.java b/test/token/TokenFactoryTest.java index b5c4609..fdcf017 100644 --- a/test/token/TokenFactoryTest.java +++ b/test/token/TokenFactoryTest.java @@ -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);