Exemplo n.º 1
0
        public async Task ComplexSpecification(PersonEntity data, bool valid, string message)
        {
            var validation = new ComplexSpecificationValidation();
            var result     = await validation.IsSatisfiedByAsync(data);

            valid.Should().Be(result, message);
        }
        public void ComplexSpecification(PersonEntity data, bool valid, string message)
        {
            var validation = new ComplexSpecificationValidation();
            var result     = validation.IsSatisfiedBy(data);

            valid.Should().Be(result, message);
        }
        public void ComplexSpecification(PersonEntity data, bool valid, string message)
        {
            ComplexSpecificationValidation validation = new ComplexSpecificationValidation();
            bool result = validation.IsSatisfiedBy(data);

            valid.Should().Be(result, message);
        }
Exemplo n.º 4
0
        public async Task ComplexSpecificationWithExecute(PersonEntity data, bool valid, string message)
        {
            var validation = new ComplexSpecificationValidation();
            var execute    = new Execute();
            var result     = await validation.IsSatisfiedByAsync(data, execute);

            valid.Should().Be(result, message);
            valid.Should().Be(!execute.HasErro, message);
        }
        public void ComplexSpecificationWithExecute(PersonEntity data, bool valid, string message)
        {
            ComplexSpecificationValidation validation = new ComplexSpecificationValidation();
            Execute execute = new Execute();
            bool result = validation.IsSatisfiedBy(data, execute);

            valid.Should().Be(result, message);
            valid.Should().Be(!execute.HasErro, message);
        }