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

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

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