/** Test of getSeed method, of class Seed. */ @Test public void testGetSeed() { System.out.println("getSeed"); Seed instance = new Seed(); Seed backup = new Seed(instance); assertArrayEquals(instance.getSeed(), backup.getSeed()); }
/** 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); }
@Test public void testHash() { try { Seed instance = new Seed(); Seed second = new Seed(instance); byte[] h1 = instance.hash(second.getSeed()); byte[] h2 = second.hash(instance.getSeed()); assertArrayEquals(h1, h2); } catch (NoSuchAlgorithmException ex) { Logger.getLogger(SeedTest.class.getName()).log(Level.SEVERE, null, ex); } }