Пример #1
0
 @Test
 public void shouldCalculateAnd() {
   assertEquals(new Chance(0.08f), chance.and(new Chance(0.4f)));
 }
Пример #2
0
 @Test
 public void shouldCalculateOr() {
   assertEquals(new Chance(0.52f), chance.or(new Chance(0.4f)));
 }
Пример #3
0
 @Test
 public void shouldCheckForComplement() {
   assertEquals(new Chance(0.8f), chance.not());
 }