Exemple #1
0
        public void Pipeline_parses_survey_correctly()
        {
            pipeline.ParseSurvey(TestSurvey.Survey());
            bus.RaisedEvents.Count.ShouldBe(3);
            var answer = bus.GetFirstEventOfType <YesNoAnswerReceived>();

            answer.SurveyName.ShouldBe(TestSurvey.Survey().Name);
        }
Exemple #2
0
        public void Answer_event_is_raised()
        {
            parser.Parse(Id, "TestSurvey", TestQuestions.YesnoQuestion);

            bus.EventTypeWasRaised <YesNoAnswerReceived>().ShouldBe(true);
            var answer = bus.GetFirstEventOfType <YesNoAnswerReceived>();

            answer.Result.ShouldBe(true);
        }
Exemple #3
0
        public void Answer_event_is_raised()
        {
            parser.Parse(Id, "TestSurvey", TestQuestions.MultipleOptionQuestion);

            bus.EventTypeWasRaised <MultipleOptionAnswerReceived>().ShouldBe(true);
            var answer = bus.GetFirstEventOfType <MultipleOptionAnswerReceived>();

            answer.SelectedOptions[0].ShouldBe("Red");
            answer.SelectedOptions[1].ShouldBe("Green");
        }