public async Task Post_ShouldReturnOkWhenEmailIsAddedToTheList() { MockGrain.Setup(m => m.AddEmailAddress(Email)).ReturnsAsync(true); Assert.IsType <CreatedResult>(await Controller.Post(Email)); }
public async Task Post_ShouldReturnConflictWhenEmailIsAlreadyOnTheList() { MockGrain.Setup(m => m.AddEmailAddress(Email)).ReturnsAsync(false); Assert.IsType <ConflictObjectResult>(await Controller.Post(Email)); }
public async Task Get_ShouldReturnNotFoundWhenEmailIsFound() { MockGrain.Setup(m => m.CheckEmailAddress(Email)).ReturnsAsync(false); Assert.IsType <NotFoundObjectResult>(await Controller.Get(Email)); }