addParameter("seed", seed);
Random rnd = new Random(seed);
// condition should always return true if initialized with false, and always
// false if initialized with true
ICACondition con = new NotCondition(new BooleanCondition(true));
for (int i = 0; i < 1000; i++) {
List<Integer> list = new ArrayList<>(8);
for (int j = 0; j < 8; j++) {
list.add((int) (rnd.nextDouble() * 1000));
}
assertFalse(con.isTrue(i, new FakeNeighborStates(list)));
}
con = new NotCondition(new BooleanCondition(false));
for (int i = 0; i < 1000; i++) {
List<Integer> list = new ArrayList<>(8);
for (int j = 0; j < 8; j++) {
list.add((int) (rnd.nextDouble() * 1000));
}
assertTrue(con.isTrue(i, new FakeNeighborStates(list)));
}
}