Пример #1
0
 /** Test of decide method, of class Seed. */
 @Test
 public void testDecide() {
   System.out.println("decide");
   int numberDecissions = 0;
   Seed instance = new Seed();
   Seed backup = new Seed(instance);
   assertArrayEquals(instance.getSeed(), backup.getSeed());
   int d1 = instance.decide(30);
   int d2 = backup.decide(30);
   assertEquals(d1, d2);
 }
Пример #2
0
 @Test
 public void testBase64Strings() {
   try {
     Seed instance = new Seed();
     String s = instance.toString();
     Seed second = new Seed(s);
     int d1 = instance.decide(2);
     int d2 = second.decide(2);
     assertEquals(d1, d2);
   } catch (Exception ex) {
     Logger.getLogger(SeedTest.class.getName()).log(Level.SEVERE, null, ex);
   }
 }