Exemplo n.º 1
0
        public async Task DeletePlantReturnsNoContentAndCorrectContentType()
        {
            // Given
            A.CallTo(() => _fakeCommand.Delete(A <Guid> .Ignored)).Returns(Task.CompletedTask);

            // When
            HttpResponseMessage response = await Client.DeleteAsync(EndPointFactory.DeleteEndpoint());

            // Then
            response.StatusCode.Should().Be(HttpStatusCode.NoContent);
            A.CallTo(() => _fakeCommand.Delete(A <Guid> .Ignored)).MustHaveHappenedOnceExactly();
        }
Exemplo n.º 2
0
        public async Task <NoContentResult> Delete(Guid id)
        {
            await _commands.Delete(id);

            return(NoContent());
        }