예제 #1
0
        public void SetUp()
        {
            ExpectedSurveyAdress       = new SurveyAdress(123, 7, "rue de Rivoli", "75000", "Paris");
            ExpectedSurveyLocationList = new List <ISurveyLocations>
            {
                new SurveyLocations(100, ExpectedSurveyAdress, CompletionStatus.TODO)
            };
            ExpectedSurveyQuestionList = new List <ISurveyQuestion>
            {
                new SurveyQuestion {
                    Id = 1, Question = "Q1"
                },
                new SurveyQuestion {
                    Id = 2, Question = "Q2"
                },
            };
            ExpectedSurvey = new Survey(175, "AnswerToAskOptionalQuestion", "AnswerToAskQuestion",
                                        ExpectedSurveyAdress, ExpectedSurveyQuestionList);

            questionHelper = Substitute.For <IQuestionHelper>();
            questionHelper.AskQuestion(Arg.Any <string>()).Returns("AnswerToAskQuestion");
            questionHelper.AskOptionalQuestion(Arg.Any <string>()).Returns("AnswerToAskOptionalQuestion");
            questionHelper.AskYesNoQuestion(Arg.Any <string>()).Returns(true);

            surveyLocationGetter = Substitute.For <ISurveyLocationGetter>();
            surveyLocationGetter.GetSurveyLocation().Returns(ExpectedSurveyLocationList);

            surveyQuestionGetter = Substitute.For <ISurveyQuestionGetter>();
            surveyQuestionGetter.GetSurveyQuestion().Returns(ExpectedSurvey);

            surveyCampaignMaker = new SurveyCampaignMaker(questionHelper, surveyLocationGetter, surveyQuestionGetter);
        }
 public SurveyCampaignMaker(IQuestionHelper questionHelper,
                            ISurveyLocationGetter surveyLocationGetter,
                            ISurveyQuestionGetter surveyQuestionGetter)
 {
     _questionHelper       = questionHelper;
     _surveyLocationGetter = surveyLocationGetter;
     _surveyQuestionGetter = surveyQuestionGetter;
 }
예제 #3
0
 public QuestionController(ICommonHelper commonHelper, IQuestionHelper questionHelper)
 {
     _commonHelper   = commonHelper;
     _questionHelper = questionHelper;
 }
예제 #4
0
 public SurveyAdressGetter(IQuestionHelper questionHelper)
 {
     _questionHelper = questionHelper;
 }
예제 #5
0
 public VoteController()
 {
     remoteObject = new QuestionHelper();
 }
 public SurveyLocationGetter(IQuestionHelper questionHelper,
                             ISurveyAdressGetter surveyAdressGetter)
 {
     _questionHelper     = questionHelper;
     _surveyAdressGetter = surveyAdressGetter;
 }