public void IsPrimeByFunction() { int[] primes = new int[] { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31 }; var Tester = new PrimeFromFunction(); for (int i = 2; i <= 32; i++) { var testresult = Tester.IsPrime(i); if (testresult) { if (!primes.Contains(i)) { Assert.True(false); } } } }