예제 #1
0
        public void SinglePositiveOddDigitAndTrueReporterHandlesEvenNumbers()
        {
            var result = UnionMatcherExamples.SinglePositiveOddDigitAndTrueReporter(new Union <int, bool>(2)) +
                         UnionMatcherExamples.SinglePositiveOddDigitAndTrueReporter(new Union <int, bool>(4)) +
                         UnionMatcherExamples.SinglePositiveOddDigitAndTrueReporter(new Union <int, bool>(6));

            AreEqual("2 isn't odd4 isn't odd6 isn't odd", result);
        }
예제 #2
0
        public void SinglePositiveOddDigitAndTrueReporterPrints1357And9Correctly()
        {
            var result = UnionMatcherExamples.SinglePositiveOddDigitAndTrueReporter(new Union <int, bool>(1)) +
                         UnionMatcherExamples.SinglePositiveOddDigitAndTrueReporter(new Union <int, bool>(3)) +
                         UnionMatcherExamples.SinglePositiveOddDigitAndTrueReporter(new Union <int, bool>(5)) +
                         UnionMatcherExamples.SinglePositiveOddDigitAndTrueReporter(new Union <int, bool>(7)) +
                         UnionMatcherExamples.SinglePositiveOddDigitAndTrueReporter(new Union <int, bool>(9));

            AreEqual("13579", result);
        }
예제 #3
0
        public void SinglePositiveOddDigitAndTrueReporterHandlesFalse()
        {
            var result = UnionMatcherExamples.SinglePositiveOddDigitAndTrueReporter(new Union <int, bool>(false));

            AreEqual("False isn't true or single odd digit.", result);
        }
예제 #4
0
        public void SinglePositiveOddDigitAndTrueReporterHandlesTrue()
        {
            var result = UnionMatcherExamples.SinglePositiveOddDigitAndTrueReporter(new Union <int, bool>(true));

            AreEqual("Found true", result);
        }
예제 #5
0
        public void SinglePositiveOddDigitAndTrueReporterHandlesNegative()
        {
            var result = UnionMatcherExamples.SinglePositiveOddDigitAndTrueReporter(new Union <int, bool>(-20));

            AreEqual("-20 isn't positive", result);
        }
예제 #6
0
        public void SinglePositiveOddDigitAndTrueReporterHandles10()
        {
            var result = UnionMatcherExamples.SinglePositiveOddDigitAndTrueReporter(new Union <int, bool>(10));

            AreEqual("10 isn't 1 digit", result);
        }