コード例 #1
0
        public void FindGDCbySteinsAlgorithmTest_12_12result()
        {
            int a = 12;

            int gdc = GreatestCommonDevisor.FindGDCbySteinsAlgorithm(a);

            Assert.AreEqual(12, gdc);
        }
コード例 #2
0
        public void FindGDCSteinsAlgorithmTest_12and9and6_3result()
        {
            int a = 12, b = 9, c = 6;

            int gdc = GreatestCommonDevisor.FindGDCbySteinsAlgorithm(a, b, c);

            Assert.AreEqual(3, gdc);
        }
コード例 #3
0
        public void FindGDCbySteinsAlgorithmTest_12and9_3result()
        {
            int a = 12, b = 9;

            int gdc = GreatestCommonDevisor.FindGDCbySteinsAlgorithm(a, b);

            Console.WriteLine();

            Assert.AreEqual(3, gdc);
        }
コード例 #4
0
        public void FindGDCbySteinsAlgorithmTest_Negative9and3and6_ArgumentOutOfRangeException()
        {
            int a = -9, b = -3, c = -6;

            int gdc = GreatestCommonDevisor.FindGDCbySteinsAlgorithm(a, b, c);
        }
コード例 #5
0
 public void FindGDCbySteinsAlgorithmTest_null_NullReferenceExeption()
 {
     int gdc = GreatestCommonDevisor.FindGDCbySteinsAlgorithm();
 }