Exemplo n.º 1
0
        public async Task GetById_WhenPartnerDoesNotExists_ShouldReturnNotFound()
        {
            // Arrange
            var id = ObjectId.GenerateNewId().ToString();

            _mediator.Send(Arg.Any <GetPartnerByIdQuery>()).Returns(default(Partner));

            // Act
            var response = await _controller.GetById(id);

            // Assert
            response.Should().NotBeNull().And.BeOfType <NotFoundObjectResult>();
        }