Exemplo n.º 1
0
        public async Task Put_InvalidRequest_ReturnBadRequest()
        {
            // Arrange
            var request          = new UpdateSampleRequest();
            var validationResult = ValidationResult.Error("invalid request");
            var apiResult        = new BadRequestObjectResult(Messages.InvalidRequest);

            requestValidator.Setup(x => x.Validate(request)).Returns(validationResult);

            // Act
            var result = await controller.Put(request);

            // Assert
            result.Should().BeEquivalentTo(apiResult);
        }