示例#1
0
 public IsWordResponseMessage IsWord(IsWordRequestMessage message)
 {
     return(new IsWordResponseMessage
     {
         CheckedWord = message.Word.ToLower(),
         IsWord = wordValidator.IsWord(message.Word)
     });
 }
示例#2
0
        public void GivenMixedCaseWord_ThenCheckedWordInReponseIsLowerCase()
        {
            var request = new IsWordRequestMessage()
            {
                Word = "Plus"
            };
            var response = requestHandler.IsWord(request);

            response.CheckedWord.ShouldBe("plus");
        }
示例#3
0
        public void GivenAMessage_ThenWordValidatorIsCalled()
        {
            var message = new IsWordRequestMessage()
            {
                Word = "plus"
            };

            requestHandler.IsWord(message);
            wordValidator.Received(1).IsWord("plus");
        }
示例#4
0
 public IsWordResponseMessage IsWord([FromBody] IsWordRequestMessage message)
 {
     return(isWordRequestHandler.IsWord(message));
 }