Ejemplo n.º 1
0
        public async void DeliveriesController_GetDeliveryByIdAsync_should_return_ok()
        {
            // Arrange
            var fakeGuid = Guid.NewGuid();

            // Act
            var result = await _controller.GetDeliveryByIdAsync(fakeGuid) as ObjectResult;

            // Assert
            result.Should().NotBeNull();
            result.StatusCode.Should().Be((int)HttpStatusCode.OK);
            _service.Verify(x => x.GetDeliveryByIdAsync(fakeGuid), Times.Once());
        }