Exemplo n.º 1
0
        public async void DeliveriesController_AssignCourierToDeliveryAsync_should_return_accepted()
        {
            // Arrange
            var dto = A.New <AssignCourierToDeliveryDtoSave>();

            // Act
            var result = await _controller.AssignCourierToDeliveryAsync(dto) as ObjectResult;

            // Assert
            result.Should().NotBeNull();
            result.StatusCode.Should().Be((int)HttpStatusCode.Accepted);
            _service.Verify(x => x.AssignCourierToDeliveryAsync(dto), Times.Once());
        }