Esempio n. 1
0
        public void should_return_nfluent_check_based_on_underlying_question_result()
        {
            const long expectedAnswer = 10;
            var        question       = new StubQuestion <long>(expectedAnswer);
            var        jack           = Actor.Named(Names.Jack);

            jack.Should(See.That(question)).IsEqualTo(expectedAnswer);
        }
Esempio n. 2
0
        public void actor_should_answer_a_question_and_remember_the_answer()
        {
            var question = new StubQuestion <long>().SetAnswer(value);

            var answer           = actor.Remember(key, question);
            var rememberedAnswer = actor.Recall <long>(key);

            Check.That(answer).IsEqualTo(value);
            Check.That(rememberedAnswer).IsEqualTo(value);
        }
Esempio n. 3
0
        public void should_answer_the_question()
        {
            var actor          = Actor.Named(Names.Jack);
            var expectedAnswer = 10;
            var question       = new StubQuestion <long>(expectedAnswer);

            var answer = actor.AsksFor(question);

            Check.That(answer).IsEqualTo(expectedAnswer);
        }
Esempio n. 4
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);
        }