public void MultipleQuestions_Results5() { var answers = new List <Dictionary <string, string> >() { new Dictionary <string, string>() { { "A", "0" } }, new Dictionary <string, string>() { { "B", "1" } }, new Dictionary <string, string>() { { "C", "2" } }, new Dictionary <string, string>() { { "D", "1" } }, new Dictionary <string, string>() { { "E", "1" } } }; var target = new ChariteCalculator(); var actual = target.Calculate(answers); actual.Should().Be(5); }
public void EmptyAnswers_Results0() { var answers = new List <Dictionary <string, string> >() { }; var target = new ChariteCalculator(); var actual = target.Calculate(answers); actual.Should().Be(0); }
public void DateValue3DaysBeforeToday_Results3() { var answers = new List <Dictionary <string, string> >() { new Dictionary <string, string>() { { "A", DateTime.Now.AddDays(-3).ToString("dd.MM.yyy") } } }; var target = new ChariteCalculator(); var actual = target.Calculate(answers); actual.Should().Be(3); }
public void QuestionAAnswer0_Results0() { var answers = new List <Dictionary <string, string> >() { new Dictionary <string, string>() { { "A", "0" } } }; var target = new ChariteCalculator(); var actual = target.Calculate(answers); actual.Should().Be(0); }
public void DateValueMultipleChoiceMixed_Results5() { var answers = new List <Dictionary <string, string> >() { new Dictionary <string, string>() { { "A", "2" } }, new Dictionary <string, string>() { { "B", DateTime.Now.AddDays(-3).ToString("dd.MM.yyy") } } }; var target = new ChariteCalculator(); var actual = target.Calculate(answers); actual.Should().Be(5); }