mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2026-03-20 00:00:03 -04:00
Major test-case cleanup.
- Removed JMock dependency, tests rewritten to use Mockito for stub/mock - All test should now be using JUnit annotation-style tests - All modules should now depend on same JUnit version - Rewrote a few tests to better utilize JUnit annotations - Fixed a few broken tests - Code style changes
This commit is contained in:
@@ -4,13 +4,14 @@ import com.sun.imageio.plugins.jpeg.JPEGImageReader;
|
||||
import com.sun.imageio.plugins.jpeg.JPEGImageReaderSpi;
|
||||
import com.twelvemonkeys.imageio.util.ImageReaderAbstractTestCase;
|
||||
import com.twelvemonkeys.lang.SystemUtil;
|
||||
import org.junit.Test;
|
||||
|
||||
import javax.imageio.IIOException;
|
||||
import javax.imageio.spi.ImageReaderSpi;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.awt.*;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* JPEGImageReaderTestCase
|
||||
@@ -67,6 +68,7 @@ public class JPEGImageReaderTestCase extends ImageReaderAbstractTestCase<JPEGIma
|
||||
return Arrays.asList(provider.getMIMETypes());
|
||||
}
|
||||
|
||||
@Test
|
||||
@Override
|
||||
public void testSetDestination() throws IOException {
|
||||
// Known bug in Sun JPEGImageReader before Java 6
|
||||
@@ -78,6 +80,7 @@ public class JPEGImageReaderTestCase extends ImageReaderAbstractTestCase<JPEGIma
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@Override
|
||||
public void testSetDestinationType() throws IOException {
|
||||
// Known bug in Sun JPEGImageReader before Java 6
|
||||
@@ -89,6 +92,7 @@ public class JPEGImageReaderTestCase extends ImageReaderAbstractTestCase<JPEGIma
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@Override
|
||||
public void testReadAsRenderedImageIndexOutOfBounds() throws IIOException {
|
||||
try {
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.twelvemonkeys.imageio.reference;
|
||||
import com.sun.imageio.plugins.png.PNGImageReader;
|
||||
import com.sun.imageio.plugins.png.PNGImageReaderSpi;
|
||||
import com.twelvemonkeys.imageio.util.ImageReaderAbstractTestCase;
|
||||
import org.junit.Test;
|
||||
|
||||
import javax.imageio.IIOException;
|
||||
import javax.imageio.spi.ImageReaderSpi;
|
||||
@@ -64,6 +65,7 @@ public class PNGImageReaderTestCase extends ImageReaderAbstractTestCase<PNGImage
|
||||
return Arrays.asList(provider.getMIMETypes());
|
||||
}
|
||||
|
||||
@Test
|
||||
@Override
|
||||
public void testSetDestinationTypeIllegal() throws IOException {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user