Beispiel #1
0
        public void Test(int assigned, bool expectedResult)
        {
            var checker        = new AdrQuestionValidityChecker();
            int positionsCount = 3;
            var result         = checker.QCumulativeIsValid(GetQCumulative(positionsCount, assigned: new FractionLong(assigned)), new FractionLong(100));

            Assert.That(result, Is.EqualTo(expectedResult));
        }
Beispiel #2
0
        public void Test2(int assignedIntegral, int assignedNumerator, int assignedDenominator, bool expectedResult)
        {
            var       checker        = new AdrQuestionValidityChecker();
            const int positionsCount = 3;
            var       assigned       = new FractionLong(assignedIntegral, assignedNumerator, assignedDenominator);
            var       result         = checker.QCumulativeIsValid(GetQCumulative(positionsCount, assigned), new FractionLong(7, 1, 2));

            Assert.That(result, Is.EqualTo(expectedResult));
        }