public async Task CreateTextMessage_Valid() { // Ararnge var controller = CreateController(); var model = new MockTextMessageModel().Valid(); RendererShouldReturn <CreateTextMessageModel>(defaultSuccessReturnData); // Act var response = await controller.TextMessage(model); // Assert AssertIsOk(response); }
public async Task CreateTextMessage_Invalid() { // Setup var controller = CreateController(modelStateInvalid: true); var model = new MockTextMessageModel().Invalid(); RendererShouldReturn <CreateTextMessageModel>(); // Perform var response = await controller.TextMessage(model); // Assert AssertIsBadRequest(response); }