Example #1
0
        public void TestGenerateWithTwoYieldsTwo()
        {
            List <int> expected = new List <int>();

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

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

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

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