Пример #1
0
        public void TestGenerateWithTwoYieldsTwo()
        {
            List <int> expected = new List <int>();

            expected.Add(2);
            Assert.AreEqual(expected, PrimeFactors.Generate(2));
        }
Пример #2
0
        public void TestGenerateWithTenYieldsFiveAndTwo()
        {
            List <int> expected = new List <int>();

            expected.Add(2);
            expected.Add(5);
            Assert.AreEqual(expected, PrimeFactors.Generate(10));
        }
Пример #3
0
        public void TestGenerateWithNineYieldsThreeAndThree()
        {
            List <int> expected = new List <int>();

            expected.Add(3);
            expected.Add(3);
            Assert.AreEqual(expected, PrimeFactors.Generate(9));
        }
Пример #4
0
 public void Init()
 {
     list           = new List <int>();
     numberToFactor = new PrimeFactors();
 }
Пример #5
0
        public void TestGenerateYieldsEmptyList()
        {
            List <int> expected = new List <int>();

            Assert.AreEqual(expected, PrimeFactors.Generate(1));
        }