(chore) cleanup test

This commit is contained in:
Andreas Penski (init) 2020-01-27 14:52:52 +01:00
parent 435c428c5f
commit 3ad1f449fa

View file

@ -27,7 +27,6 @@ import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URISyntaxException; import java.net.URISyntaxException;
import java.net.URL; import java.net.URL;
import java.nio.file.Paths; import java.nio.file.Paths;
@ -50,18 +49,6 @@ public class InputFactoryTest {
public static final String SOME_VALUE = "some value"; public static final String SOME_VALUE = "some value";
private static URL NOT_EXISTING;
static {
try {
NOT_EXISTING = new URL("file://localhost/somefile.text");
} catch (final MalformedURLException e) {
// just ignore;
}
}
@Rule @Rule
public ExpectedException expectedException = ExpectedException.none(); public ExpectedException expectedException = ExpectedException.none();
@ -82,8 +69,6 @@ public class InputFactoryTest {
assertThat(s1).isNotEqualTo(s3); assertThat(s1).isNotEqualTo(s3);
} }
@Test @Test
public void testWrongAlgorithm() { public void testWrongAlgorithm() {
this.expectedException.expect(IllegalArgumentException.class); this.expectedException.expect(IllegalArgumentException.class);
@ -111,7 +96,7 @@ public class InputFactoryTest {
@Test @Test
public void testNullStream() { public void testNullStream() {
this.expectedException.expect(IllegalArgumentException.class); this.expectedException.expect(IllegalArgumentException.class);
final Input input = InputFactory.read((InputStream)null, SOME_VALUE); final Input input = InputFactory.read((InputStream) null, SOME_VALUE);
} }
@Test @Test
@ -175,8 +160,7 @@ public class InputFactoryTest {
@Test @Test
public void testUnexistingInput() { public void testUnexistingInput() {
this.expectedException.expect(IllegalArgumentException.class); this.expectedException.expect(IllegalArgumentException.class);
InputFactory.read(NOT_EXISTING); InputFactory.read(Simple.NOT_EXISTING);
} }
} }