Ejemplo n.º 1
0
 public static void CrackRng_Test(
     int shelves,
     int slot1,
     int slot2,
     int slot3,
     int[] priorSeeds,
     int expectedSeeds
     )
 {
     int[] results = new CrackerTask().GetSeeds(shelves, slot1, slot2, slot3, priorSeeds);
     Assert.AreEqual(expectedSeeds, results.Length);
 }
Ejemplo n.º 2
0
            public static void CrackRngMultiple_Test(
                int shelves1,
                int s11,
                int s21,
                int s31,
                int[] priorSeeds,
                int expected1,
                int shelves2,
                int s12,
                int s22,
                int s32,
                int expected2
                )
            {
                var cracker = new CrackerTask();

                int[] results = cracker.GetSeeds(shelves1, s11, s21, s31, priorSeeds);
                Assert.AreEqual(expected1, results.Length);
                int[] results2 = cracker.GetSeeds(shelves2, s12, s22, s32, results);
                Assert.AreEqual(expected2, results2.Length);
            }
Ejemplo n.º 3
0
            public static void CrackRngAll_Test(
                int[] shelves,
                int[] slots1,
                int[] slots2,
                int[] slots3,
                int[] seedCounts,
                int finalSeed
                )
            {
                var cracker = new CrackerTask();

                int[] results = null;
                var   len     = shelves.Length;

                for (var i = 0; i < len; ++i)
                {
                    results = cracker.GetSeeds(shelves[i], slots1[i], slots2[i], slots3[i], results);
                    Assert.AreEqual(seedCounts[i], results.Length);
                }

                Assert.NotNull(results);
                Assert.AreEqual(finalSeed, results[0]);
            }