コード例 #1
0
        public void TestIsPrime_OneReturnsFalse()
        {
            PrimeGrid target        = new PrimeGrid();
            int       numberToCheck = 1;
            Boolean   actual        = target.IsPrime(numberToCheck);

            Assert.IsFalse(actual);
        }
コード例 #2
0
        public void TestIsPrime_NinetySevenReturnsTrue()
        {
            PrimeGrid target        = new PrimeGrid();
            int       numberToCheck = 97;
            Boolean   actual        = target.IsPrime(numberToCheck);

            Assert.IsTrue(actual);
        }
コード例 #3
0
        public void TestIsPrime_EvenNumbersReturnFalse()
        {
            PrimeGrid target        = new PrimeGrid();
            int       numberToCheck = 4; //Using 4 as 2 is prime - create test to account for that next
            bool      actual        = target.IsPrime(numberToCheck);

            Assert.IsFalse(actual);
        }