public async Task CreateEmail_Valid() { // Ararnge var controller = CreateController(); var model = new MockEmailModel().Valid(); RendererShouldReturn <CreateEmailModel>(defaultSuccessReturnData); // Act var response = await controller.Email(model); // Assert AssertIsOk(response); }
public async Task CreateEmail_Invalid() { // Setup var controller = CreateController(modelStateInvalid: true); var model = new MockEmailModel().Invalid(); RendererShouldReturn <CreateEmailModel>(); // Perform var response = await controller.Email(model); // Assert AssertIsBadRequest(response); }