コード例 #1
0
ファイル: Program.cs プロジェクト: devneil/codemire-katas
        private static void TestMax(int thisNumber, int expected)
        {
            int[] factors = new Factors().GetPrimeFactorsOf(thisNumber);
            int max = factors.Max();

            max.Should().Be(expected);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: devneil/codemire-katas
        static void Main(string[] args)
        {
            int[] factors = new Factors().GetPrimeFactorsOf(600851475143);
            int max = factors.Max();


            Console.WriteLine("The result is: {0}", max);
            Console.ReadLine();
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: devneil/codemire-katas
 private static void Test(int thisNumber, IEnumerable<int> expectation)
 {
     var factors = new Factors().GetPrimeFactorsOf(thisNumber);
     factors.ShouldAllBeEquivalentTo(expectation);
 }
コード例 #4
0
ファイル: Program.cs プロジェクト: devneil/codemire-katas
 private static void TestEmpty(int thisNumber)
 {
     int[] factors = new Factors().GetPrimeFactorsOf(thisNumber);
     factors.Should().BeEmpty();
 }