1, 2, 3, 4, 5, 6, 7, 8, 9,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10
});
{
Statistics stat = new Statistics(vTest);
for (int i = 0; i <= 10; i++) {
stat.removeValues(new Double(i), false);
vTest.remove(new Double(i));
Assert.assertEquals(vTest, stat.getValues());
}
}
{
Statistics stat = new Statistics(vTest);
for (int i = 0; i <= 10; i++) {
stat.removeValues(new Double(i), true);
vTest.removeAll(asList(new double[]{i}));
Assert.assertEquals(vTest, stat.getValues());
}
assertClean(stat);
}
try {
new Statistics().removeValues(null, false);
Assert.fail("IllegalArgumentException expected but not thrown");
} catch (IllegalArgumentException e) {
}
try {
new Statistics().removeValues(null, true);
Assert.fail("IllegalArgumentException expected but not thrown");
} catch (IllegalArgumentException e) {
}
}