mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-02 11:05:29 -04:00
...and fix the broken test.
This commit is contained in:
parent
08282ea09d
commit
16caec4a22
@ -8,8 +8,7 @@ import java.io.IOException;
|
|||||||
import java.lang.reflect.ParameterizedType;
|
import java.lang.reflect.ParameterizedType;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.*;
|
||||||
import static org.junit.Assert.assertNotNull;
|
|
||||||
|
|
||||||
abstract class ImageInputStreamSpiTest<T> {
|
abstract class ImageInputStreamSpiTest<T> {
|
||||||
private final ImageInputStreamSpi provider = createProvider();
|
private final ImageInputStreamSpi provider = createProvider();
|
||||||
@ -53,11 +52,15 @@ abstract class ImageInputStreamSpiTest<T> {
|
|||||||
provider.createInputStreamInstance(null, true, ImageIO.getCacheDirectory());
|
provider.createInputStreamInstance(null, true, ImageIO.getCacheDirectory());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = IllegalArgumentException.class)
|
@Test
|
||||||
public void createCachedNullCache() throws IOException {
|
public void createCachedNullCache() throws IOException {
|
||||||
if (provider.canUseCacheFile() || provider.needsCacheFile()) {
|
try {
|
||||||
provider.createInputStreamInstance(createInput(), true, null);
|
provider.createInputStreamInstance(createInput(), true, null);
|
||||||
}
|
}
|
||||||
|
catch (IllegalArgumentException expected) {
|
||||||
|
// All good
|
||||||
|
assertFalse(provider.needsCacheFile());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user