Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        public async Task <NoContentResult> Delete(Guid id)
        {
            await _commands.Delete(id);

            return(NoContent());
        }