コード例 #1
0
        public InvoiceItemIsValidForImportValidation(
            IDomainModelMustExistsSpecification domainModelMustExistsSpecification,
            IDomainModelMustHaveCreationDateSpecification domainModelMustHaveCreationDateSpecification,
            IDomainModelMustHaveCreationUserSpecification domainModelMustHaveCreationUserSpecification,
            IDomainModelMustHaveIdSpecification domainModelMustHaveIdSpecification,
            IDomainModelMustHaveModificationDateGreaterThanCreationDateSpecification domainModelMustHaveModificationDateGreaterThanCreationDateSpecification,
            IDomainModelMustHaveModificationDateSpecification domainModelMustHaveModificationDateSpecification,
            IDomainModelMustHaveModificationUserSpecification domainModelMustHaveModificationUserSpecification,
            IDomainModelMustHaveTenantCodeSpecification domainModelMustHaveTenantCodeSpecification,
            IDomainModelMustHaveTenantCodeWithValidLengthSpecification domainModelMustHaveTenantCodeWithValidLengthSpecification,
            IDomainModelMustNotExistsSpecification domainModelMustNotExistsSpecification,

            // InvoiceItens
            IInvoiceItemMustHaveInvoiceSpecification invoiceItemMustHaveInvoiceSpecification,
            IInvoiceItemMustHaveProductSpecification invoiceItemMustHaveProductSpecification,
            IInvoiceItemMustHaveQuatityWithValidLengthSpecification invoiceItemMustHaveQuatityWithValidLengthSpecification,
            IInvoiceItemMustHaveUnitPriceWithValidLengthSpecification invoiceItemMustHaveUnitPriceWithValidLengthSpecification
            ) : base(domainModelMustExistsSpecification, domainModelMustHaveCreationDateSpecification, domainModelMustHaveCreationUserSpecification, domainModelMustHaveIdSpecification, domainModelMustHaveModificationDateGreaterThanCreationDateSpecification, domainModelMustHaveModificationDateSpecification, domainModelMustHaveModificationUserSpecification, domainModelMustHaveTenantCodeSpecification, domainModelMustHaveTenantCodeWithValidLengthSpecification, domainModelMustNotExistsSpecification)
        {
            AddMustHaveTenantCodeSpecification();
            AddMustHaveTenantCodeWithValidLengthSpecification();

            AddSpecification(invoiceItemMustHaveInvoiceSpecification);
            AddSpecification(invoiceItemMustHaveProductSpecification);
            AddSpecification(invoiceItemMustHaveQuatityWithValidLengthSpecification);
            AddSpecification(invoiceItemMustHaveUnitPriceWithValidLengthSpecification);
        }
コード例 #2
0
        public CustomerIsValidForImportValidation(
            IDomainModelMustExistsSpecification domainModelMustExistsSpecification,
            IDomainModelMustHaveCreationDateSpecification domainModelMustHaveCreationDateSpecification,
            IDomainModelMustHaveCreationUserSpecification domainModelMustHaveCreationUserSpecification,
            IDomainModelMustHaveIdSpecification domainModelMustHaveIdSpecification,
            IDomainModelMustHaveModificationDateGreaterThanCreationDateSpecification domainModelMustHaveModificationDateGreaterThanCreationDateSpecification,
            IDomainModelMustHaveModificationDateSpecification domainModelMustHaveModificationDateSpecification,
            IDomainModelMustHaveModificationUserSpecification domainModelMustHaveModificationUserSpecification,
            IDomainModelMustHaveTenantCodeSpecification domainModelMustHaveTenantCodeSpecification,
            IDomainModelMustHaveTenantCodeWithValidLengthSpecification domainModelMustHaveTenantCodeWithValidLengthSpecification,
            IDomainModelMustNotExistsSpecification domainModelMustNotExistsSpecification,

            ICustomerGovernamentalDocumentNumberMustBeUniqueSpecification customerGovernamentalDocumentNumberMustBeUniqueSpecification,
            ICustomerMustHaveGovernamentalDocumentNumberSpecification customerMustHaveGovernamentalDocumentNumberSpecification,
            ICustomerMustHaveGovernamentalDocumentNumberWithValidLengthSpecification customerMustHaveGovernamentalDocumentNumberWithValidLengthSpecification,
            ICustomerMustHaveNameSpecification customerMustHaveNameSpecification,
            ICustomerMustHaveNameWithValidLengthSpecification customerMustHaveNameWithValidLengthSpecification,
            ICustomerMustHaveValidGovernamentalDocumentNumberSpecification customerMustHaveValidGovernamentalDocumentNumberSpecification
            ) : base(domainModelMustExistsSpecification, domainModelMustHaveCreationDateSpecification, domainModelMustHaveCreationUserSpecification, domainModelMustHaveIdSpecification, domainModelMustHaveModificationDateGreaterThanCreationDateSpecification, domainModelMustHaveModificationDateSpecification, domainModelMustHaveModificationUserSpecification, domainModelMustHaveTenantCodeSpecification, domainModelMustHaveTenantCodeWithValidLengthSpecification, domainModelMustNotExistsSpecification)
        {
            AddMustHaveTenantCodeSpecification();
            AddMustHaveTenantCodeWithValidLengthSpecification();

            AddSpecification(customerGovernamentalDocumentNumberMustBeUniqueSpecification);
            AddSpecification(customerMustHaveGovernamentalDocumentNumberSpecification);
            AddSpecification(customerMustHaveGovernamentalDocumentNumberWithValidLengthSpecification);
            AddSpecification(customerMustHaveNameSpecification);
            AddSpecification(customerMustHaveNameWithValidLengthSpecification);
            AddSpecification(customerMustHaveValidGovernamentalDocumentNumberSpecification);
        }
コード例 #3
0
        public ProductIsValidForImportValidation(IDomainModelMustExistsSpecification domainModelMustExistsSpecification,
                                                 IDomainModelMustHaveCreationDateSpecification domainModelMustHaveCreationDateSpecification,
                                                 IDomainModelMustHaveCreationUserSpecification domainModelMustHaveCreationUserSpecification,
                                                 IDomainModelMustHaveIdSpecification domainModelMustHaveIdSpecification,
                                                 IDomainModelMustHaveModificationDateGreaterThanCreationDateSpecification domainModelMustHaveModificationDateGreaterThanCreationDateSpecification,
                                                 IDomainModelMustHaveModificationDateSpecification domainModelMustHaveModificationDateSpecification,
                                                 IDomainModelMustHaveModificationUserSpecification domainModelMustHaveModificationUserSpecification,
                                                 IDomainModelMustHaveTenantCodeSpecification domainModelMustHaveTenantCodeSpecification,
                                                 IDomainModelMustHaveTenantCodeWithValidLengthSpecification domainModelMustHaveTenantCodeWithValidLengthSpecification,
                                                 IDomainModelMustNotExistsSpecification domainModelMustNotExistsSpecification,

                                                 IProductMustHaveCodeSpecification productMustHaveCodeSpecification,
                                                 IProductMustHaveCodeWithValidLengthSpecification productMustHaveCodeWithValidLengthSpecification,
                                                 IProductMustHaveNameSpecification productMustHaveNameSpecification,
                                                 IProductMustHaveNameWithValidLengthSpecification productMustHaveNameWithValidLengthSpecification
                                                 ) : base(domainModelMustExistsSpecification, domainModelMustHaveCreationDateSpecification, domainModelMustHaveCreationUserSpecification, domainModelMustHaveIdSpecification, domainModelMustHaveModificationDateGreaterThanCreationDateSpecification, domainModelMustHaveModificationDateSpecification, domainModelMustHaveModificationUserSpecification, domainModelMustHaveTenantCodeSpecification, domainModelMustHaveTenantCodeWithValidLengthSpecification, domainModelMustNotExistsSpecification)
        {
            AddMustHaveTenantCodeSpecification();
            AddMustHaveTenantCodeWithValidLengthSpecification();

            AddSpecification(productMustHaveCodeSpecification);
            AddSpecification(productMustHaveCodeWithValidLengthSpecification);
            AddSpecification(productMustHaveNameSpecification);
            AddSpecification(productMustHaveNameWithValidLengthSpecification);
        }
コード例 #4
0
 protected DomainModelValidatorBase(
     IDomainModelMustExistsSpecification domainModelMustExistsSpecification,
     IDomainModelMustHaveCreationDateSpecification domainModelMustHaveCreationDateSpecification,
     IDomainModelMustHaveCreationUserSpecification domainModelMustHaveCreationUserSpecification,
     IDomainModelMustHaveIdSpecification domainModelMustHaveIdSpecification,
     IDomainModelMustHaveModificationDateGreaterThanCreationDateSpecification domainModelMustHaveModificationDateGreaterThanCreationDateSpecification,
     IDomainModelMustHaveModificationDateSpecification domainModelMustHaveModificationDateSpecification,
     IDomainModelMustHaveModificationUserSpecification domainModelMustHaveModificationUserSpecification,
     IDomainModelMustHaveTenantCodeSpecification domainModelMustHaveTenantCodeSpecification,
     IDomainModelMustHaveTenantCodeWithValidLengthSpecification domainModelMustHaveTenantCodeWithValidLengthSpecification,
     IDomainModelMustNotExistsSpecification domainModelMustNotExistsSpecification
     )
 {
     _domainModelMustExistsSpecification           = domainModelMustExistsSpecification;
     _domainModelMustHaveCreationDateSpecification = domainModelMustHaveCreationDateSpecification;
     _domainModelMustHaveCreationUserSpecification = domainModelMustHaveCreationUserSpecification;
     _domainModelMustHaveIdSpecification           = domainModelMustHaveIdSpecification;
     _domainModelMustHaveModificationDateGreaterThanCreationDateSpecification = domainModelMustHaveModificationDateGreaterThanCreationDateSpecification;
     _domainModelMustHaveModificationDateSpecification          = domainModelMustHaveModificationDateSpecification;
     _domainModelMustHaveModificationUserSpecification          = domainModelMustHaveModificationUserSpecification;
     _domainModelMustHaveTenantCodeSpecification                = domainModelMustHaveTenantCodeSpecification;
     _domainModelMustHaveTenantCodeWithValidLengthSpecification = domainModelMustHaveTenantCodeWithValidLengthSpecification;
     _domainModelMustNotExistsSpecification = domainModelMustNotExistsSpecification;
 }