示例#1
0
        public void CanIDetectedNoPrimaryNumber()
        {
            PrimaryNumbers pn         = new PrimaryNumbers();
            int            notPrimary = 9;

            Assert.IsFalse(pn.IsPrimary(notPrimary));
        }
示例#2
0
        public void CanIDetectedPrimaryNumber()
        {
            PrimaryNumbers pn             = new PrimaryNumbers();
            var            primaryNumbers = new List <int> {
                3, 7, 11, 17, 19, 31
            };

            foreach (var primaryNumber in primaryNumbers)
            {
                Assert.IsTrue(pn.IsPrimary(primaryNumber));
            }
        }