public class AGMapServerTestPart1 extends Object
Modifier and Type | Field and Description |
---|---|
(package private) static double |
doubleThreshhold |
(package private) static boolean |
initialized |
(package private) static List<TestParams> |
params |
(package private) static int |
passedRaster |
(package private) static int |
passedRoute |
(package private) static double |
SSD_THRESHHOLD |
Constructor and Description |
---|
AGMapServerTestPart1() |
Modifier and Type | Method and Description |
---|---|
private void |
assertImageArrayEquals(String msg,
byte[] imarr1,
byte[] imarr2) |
private void |
assertImageArrayEquals(String msg,
byte[] imarr1,
byte[] imarr2,
double threshhold) |
private void |
checkParamsMap(String err,
Map<String,Object> m1,
Map<String,Object> m2) |
private double |
computePixelSSD(int rgb1,
int rgb2) |
private double |
computeSSD(BufferedImage im1,
BufferedImage im2) |
void |
setUp()
Initializes the student MapServer statically.
|
void |
testAGetMapRaster()
Test the rastering functionality of the student code, by writing the ByteArrayOutputStream
to a byte[] array and comparing it with the staff result byte-wise.
|
void |
testBGetMapRasterParams()
Check the student raster output parameters against the staff output parameters.
|
static List<TestParams> params
static final double doubleThreshhold
static final double SSD_THRESHHOLD
static int passedRaster
static int passedRoute
static boolean initialized
public void setUp() throws Exception
List
of TestParams.Exception
private double computePixelSSD(int rgb1, int rgb2)
private double computeSSD(BufferedImage im1, BufferedImage im2)
private void assertImageArrayEquals(String msg, byte[] imarr1, byte[] imarr2) throws IOException
IOException
private void assertImageArrayEquals(String msg, byte[] imarr1, byte[] imarr2, double threshhold) throws IOException
IOException
private void checkParamsMap(String err, Map<String,Object> m1, Map<String,Object> m2)
public void testAGetMapRaster() throws Exception
Exception