Exemplo n.º 1
0
        public void SinglePositiveOddDigitReporterHandlesEvenNumbers()
        {
            var result = OptionMatcherExamples.SinglePositiveOddDigitReporter(Option <int> .Some(2)) +
                         OptionMatcherExamples.SinglePositiveOddDigitReporter(Option <int> .Some(4)) +
                         OptionMatcherExamples.SinglePositiveOddDigitReporter(Option <int> .Some(6));

            AreEqual("2 isn't odd4 isn't odd6 isn't odd", result);
        }
Exemplo n.º 2
0
        public void SinglePositiveOddDigitReporterHandlesNegative()
        {
            var result = OptionMatcherExamples.SinglePositiveOddDigitReporter(Option <int> .Some(-20));

            AreEqual("-20 isn't positive", result);
        }
Exemplo n.º 3
0
        public void SinglePositiveOddDigitReporterHandles10()
        {
            var result = OptionMatcherExamples.SinglePositiveOddDigitReporter(Option <int> .Some(10));

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