Пример #1
0
        public void IsPrimeNumber_Returns_False_For_Composite_Numbers()
        {
            var compositeNumbers = new int[] { 1, 4, 6, 8, 9, 10, 12 };

            foreach (int compositeNumber in compositeNumbers)
            {
                PrimeMath.IsPrimeNumber(compositeNumber).Should().BeFalse();
            }
        }
Пример #2
0
        public void IsPrimeNumber_Returns_True_For_Prime_Numbers()
        {
            var primeNumbers = new[] { 2, 3, 5, 7, 11, 13 };

            foreach (int primeNumber in primeNumbers)
            {
                PrimeMath.IsPrimeNumber(primeNumber).Should().BeTrue();
            }
        }