コード例 #1
0
 private QuestionCommands CreateQuestionCommand(IQuestionGateway questionGateway, IAnswerGateway answerGateway, IRequestUserProvider requestUserProvider)
 {
     return(new QuestionCommands(questionGateway, requestUserProvider, answerGateway));
 }
コード例 #2
0
 public AnswerQuestionBuilder()
 {
     _answerGateway       = Substitute.For <IAnswerGateway>();
     _questionGateway     = Substitute.For <IQuestionGateway>();
     _requestUserProvider = Substitute.For <IRequestUserProvider>();
 }
コード例 #3
0
 public AnswersCommand(IAnswerGateway answersGateway, IQuestionGateway questionGateway, IRequestUserProvider requestUserProvider)
 {
     _answersGateway      = answersGateway;
     _questionGateway     = questionGateway;
     _requestUserProvider = requestUserProvider;
 }
コード例 #4
0
 public AskQuestionCommandBuilder()
 {
     _questionGateway     = Substitute.For <IQuestionGateway>();
     _requestUserProvider = Substitute.For <IRequestUserProvider>();
     _answerGateway       = Substitute.For <IAnswerGateway>();
 }
コード例 #5
0
 public QuestionCommands(IQuestionGateway questionGateway, IRequestUserProvider requestUserProvider, IAnswerGateway answerGateway)
 {
     _questionGateway     = questionGateway ?? throw new NullReferenceException("QuestionGateway value cannot be null");
     _requestUserProvider = requestUserProvider ?? throw new NullReferenceException("RequestUserProvider value cannot be null");
     _answersGateway      = answerGateway ?? throw new NullReferenceException("AnswerGateway value cannot be null");
 }