/**
* Some basic checks for the getValue(int, int) method.
*/
public void testGetValue2() {
DefaultKeyedValues2D d = new DefaultKeyedValues2D();
boolean pass = false;
try {
d.getValue(0, 0);
}
catch (IndexOutOfBoundsException e) {
pass = true;
}
assertTrue(pass);
d.addValue(new Double(1.0), "R1", "C1");
assertEquals(1.0, d.getValue(0, 0).doubleValue(), EPSILON);
d.addValue(new Double(2.0), "R2", "C2");
assertEquals(2.0, d.getValue(1, 1).doubleValue(), EPSILON);
assertNull(d.getValue(1, 0));
assertNull(d.getValue(0, 1));
pass = false;
try {
d.getValue(2, 0);
}
catch (IndexOutOfBoundsException e) {
pass = true;
}
assertTrue(pass);