public void Test_dataFilterQuirkyBeacon_ConstructorPrime() { // Arrange/Act dataFilterQuirkyBeacon d = new dataFilterQuirkyBeacon(5); int[] testArray = new int[1] { 5 }; // Assert CollectionAssert.AreEqual(d.filter(), testArray); }
public void Test_dataFilterQuirkyBeacon_SetPrimeWithoutPrime() { // Arrange dataFilterQuirkyBeacon d = new dataFilterQuirkyBeacon(17); int[] testArray = new int[1] { 17 }; // Act d.setPrime(18); // Assert CollectionAssert.AreEqual(d.filter(), testArray); }
public void Test_dataFilterQuirkyBeacon_FilterSmallMode() { // Arrange dataFilterQuirkyBeacon d = new dataFilterQuirkyBeacon(23); int[] testArray = new int[7] { 25, 14, 29, 40, 8, 59, 2 }; int[] assertArray = new int[3] { 14, 8, 2 }; // Act d.scramble(testArray); // Using scramble to set array, ignoring its output in this test int[] dFilter = d.filter(); // Assert CollectionAssert.AreEqual(dFilter, assertArray); }
public void Test_dataFilterQuirkyBeacon_FilterLargeMode() { // Arrange dataFilterQuirkyBeacon d = new dataFilterQuirkyBeacon(41); d.setMode(true); int[] testArray = new int[7] { 59, 24, 37, 15, 63, 104, 2 }; int[] assertArray = new int[3] { 59, 63, 104 }; // Act d.scramble(testArray); int[] dFilter = d.filter(); // Assert CollectionAssert.AreEqual(dFilter, assertArray); }