Beispiel #1
0
        public void False_If_Number_Is_Not_Divisible_By_Any_Number_But_Itself_Or_1()
        {
            //arrange
            var generator = new PrimeNumberValidator();

            //act
            var result = generator.IsPrime(9);

            //assert
            Assert.IsFalse(result);
        }
Beispiel #2
0
        public void False_If_Number_Is_Even()
        {
            //arrange
            var generator = new PrimeNumberValidator();

            //act
            var result = generator.IsPrime(4);

            //assert
            Assert.IsFalse(result);
        }
Beispiel #3
0
        public void False_If__Number_Has_Decimal_Point_If_Divisible_By_Number_Other_Than_Itself()
        {
            var generator = new PrimeNumberValidator();


            //Act

            var result = generator.IsPrime(-1);

            Assert.IsFalse(result);
        }
Beispiel #4
0
        public void False_If__Number_Is_Even_And_Greater_Than_Two()
        {
            var generator = new PrimeNumberValidator();


            //Act

            var result = generator.IsPrime(-1);

            Assert.IsFalse(result);
        }
Beispiel #5
0
        public void False_If_Number_Less_Than_Zero()
        {
            //Arrange
            var generator = new PrimeNumberValidator();

            //Act

            var result = generator.IsPrime(-1);

            Assert.IsFalse(result);
        }
Beispiel #6
0
        public void False_If_Number_Equal_To_One()
        {
            // Arrange
            var generator = new PrimeNumberValidator();


            //Act

            var result = generator.IsPrime(1);

            Assert.IsFalse(result);
        }