public IsWordResponseMessage IsWord(IsWordRequestMessage message) { return(new IsWordResponseMessage { CheckedWord = message.Word.ToLower(), IsWord = wordValidator.IsWord(message.Word) }); }
public void GivenMixedCaseWord_ThenCheckedWordInReponseIsLowerCase() { var request = new IsWordRequestMessage() { Word = "Plus" }; var response = requestHandler.IsWord(request); response.CheckedWord.ShouldBe("plus"); }
public void GivenAMessage_ThenWordValidatorIsCalled() { var message = new IsWordRequestMessage() { Word = "plus" }; requestHandler.IsWord(message); wordValidator.Received(1).IsWord("plus"); }
public IsWordResponseMessage IsWord([FromBody] IsWordRequestMessage message) { return(isWordRequestHandler.IsWord(message)); }