예제 #1
0
        public void should_return_maximum_value_of_answers()
        {
            var questions      = QuestionTestFactory.CreateSomeQuestionsWithAnswers(40, 100, 50);
            var expectedAnswer = 100L;

            var actualAnswer = _actor.AsksFor(Max.Of(questions));

            Check.That(actualAnswer).IsEqualTo(expectedAnswer);
        }
예제 #2
0
        public void should_return_maximum_of_results_on_complex_objects()
        {
            var hot          = new Celsius(70);
            var cold         = new Celsius(25);
            var hotQuestion  = new StubQuestion <Celsius>().SetAnswer(hot);
            var coldQuestion = new StubQuestion <Celsius>().SetAnswer(cold);

            var answer = _actor.AsksFor(Max.Of(hotQuestion, coldQuestion));

            Check.That(answer).IsEqualTo(hot);
        }