コード例 #1
0
        public void PascalMethod_InCorrectRowCol_ReutrnsInCorrectValue()
        {
            PascalAssignment obj = new PascalAssignment();
            var actualResult     = PascalAssignment.pascal(3, 6);
            var expectedResult   = 10;

            Assert.AreNotEqual(expectedResult, actualResult);
        }
コード例 #2
0
        public void PascalMethod_ValidRowCol_ReutrnsCorrectValue()
        {
            PascalAssignment obj = new PascalAssignment();
            var actualResult     = PascalAssignment.pascal(1, 3);
            var expectedResult   = 3;

            Assert.AreEqual(expectedResult, actualResult);
        }
コード例 #3
0
        public void ValidatePascalRule()
        {
            PascalAssignment obj = new PascalAssignment();
            var first            = PascalAssignment.pascal(2, 5);
            var second           = PascalAssignment.pascal(3, 5);
            var result           = PascalAssignment.pascal(3, 6);

            Assert.AreEqual(result, (first + second));
        }