public void Test_dataModBeacon_ScrambleLargeMode() { // Arrange dataModBeacon d = new dataModBeacon(); d.setMode(true); int[] testArray = new int[6] { 8, 24, 30, 31, 6, 11 }; int[] assertArray = new int[6] { 24, 8, 30, 2, 6, 2 }; // Act int[] dScramble = d.scramble(testArray); // Assert CollectionAssert.AreEqual(dScramble, assertArray); }
public void Test_dataModBeacon_FilterLargeMode() { // Arrange dataModBeacon d = new dataModBeacon(13); d.setMode(true); int[] testArray = new int[6] { 8, 24, 30, 31, 6, 11 }; int[] assertArray = new int[2] { 25, 31 }; // Act d.scramble(testArray); // NOTE: All prime numbers will be replaced with '2' before updating int[] dFilter = d.filter(); // Assert CollectionAssert.AreEqual(dFilter, assertArray); }