Example #1
0
    public void TestNwd(int a, int b, int expected)
    {
        var result = SumFractions.Nwd(a, b);

        Assert.AreEqual(expected, result);

        int[,]  c = new int[, ] {
            { 1, 2 }, { 2, 9 }, { 3, 18 }, { 4, 24 }, { 6, 48 }
        };
    }
Example #2
0
    public static void test()
    {
        int[,] a = { { 1, 2 }, { 2, 9 }, { 3, 18 }, { 4, 24 }, { 6, 48 } };
        String r = "[85, 72]";

        testing(SumFractions.SumFracts(a), r);
        a = new[, ] {
            { 1, 2 }, { 1, 3 }, { 1, 4 }
        };
        r = "[13, 12]";
        testing(SumFractions.SumFracts(a), r);
        a = new[, ] {
            { 1, 3 }, { 5, 3 }
        };
        r = "2";
        testing(SumFractions.SumFracts(a), r);
        a = new int[, ] {
        };
        testing(SumFractions.SumFracts(a), null);
    }
Example #3
0
    //[Ignore("NotReady yet")]
    public void test()
    {
        Console.WriteLine("Fixed Tests");
        int[,] a = new int[, ] {
            { 1, 2 }, { 2, 9 }, { 3, 18 }, { 4, 24 }, { 6, 48 }
        };
        String r = "[85, 72]";

        testing(SumFractions.SumFracts(a), r);
        a = new int[, ] {
            { 1, 2 }, { 1, 3 }, { 1, 4 }
        };
        r = "[13, 12]";
        testing(SumFractions.SumFracts(a), r);
        a = new int[, ] {
            { 1, 3 }, { 5, 3 }
        };
        r = "2";
        testing(SumFractions.SumFracts(a), r);
        a = new int[, ] {
        };
        r = null;
    }
Example #4
0
    public void TestNww(int a, int b, int expected)
    {
        var result = SumFractions.Nww(a, b);

        Assert.AreEqual(expected, result);
    }
Example #5
0
 public string My() => SumFractions.SumFracts(data);
Example #6
0
        public void SumFractsTest()
        {
            var result = SumFractions.SumFracts(_a);

            Assert.True(result == _expected, "This test needs an implementation");
        }