public async Task DeleteNutrientReturnsNoContentAndCorrectContentType() { // Given A.CallTo(() => _fakeCommands.Delete(A <Guid> .Ignored)).Returns(Task.CompletedTask); // When HttpResponseMessage response = await Client.DeleteAsync(EndPointFactory.DeleteEndpoint()); // Then response.StatusCode.Should().Be(HttpStatusCode.NoContent); A.CallTo(() => _fakeCommands.Delete(A <Guid> .Ignored)).MustHaveHappenedOnceExactly(); }
public async Task <NoContentResult> Delete(Guid id) { await _commands.Delete(id); return(NoContent()); }