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);
        }
        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);
        }
        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);
        }
Пример #4
0
 public DomainModelValidatorBaseSpecifications(
     IDomainModelMustHaveIdSpecification <T> domainModelMustHaveIdSpecification,
     IDomainModelMustDontHaveIdSpecification <T> domainModelMustDontHaveIdSpecification,
     IDomainModelMustHaveTenantInfoSpecification <T> domainModelMustHaveTenantInfoSpecification,
     IDomainModelMustHaveTenantInfoCodeWithValidLengthSpecification <T> domainModelMustHaveTenantInfoCodeWithValidLengthSpecification,
     IActivableDomainModelMustHaveActivationInfoSpecification <T> activableDomainModelMustHaveActivationInfoSpecification,
     IActivableDomainModelMustHaveInactivationInfoSpecification <T> activableDomainModelMustHaveInactivationInfoSpecification,
     IAuditableDomainModelMustHaveCreationInfoSpecification <T> auditableDomainModelMustHaveCreationInfoSpecification,
     IAuditableDomainModelMustHaveModificationInfoSpecification <T> auditableDomainModelMustHaveModificationInfoSpecification)
 {
     DomainModelMustHaveIdSpecification         = domainModelMustHaveIdSpecification;
     DomainModelMustDontHaveIdSpecification     = domainModelMustDontHaveIdSpecification;
     DomainModelMustHaveTenantInfoSpecification = domainModelMustHaveTenantInfoSpecification;
     DomainModelMustHaveTenantInfoCodeWithValidLengthSpecification = domainModelMustHaveTenantInfoCodeWithValidLengthSpecification;
     ActivableDomainModelMustHaveActivationInfoSpecification       = activableDomainModelMustHaveActivationInfoSpecification;
     ActivableDomainModelMustHaveInactivationInfoSpecification     = activableDomainModelMustHaveInactivationInfoSpecification;
     AuditableDomainModelMustHaveCreationInfoSpecification         = auditableDomainModelMustHaveCreationInfoSpecification;
     AuditableDomainModelMustHaveModificationInfoSpecification     = auditableDomainModelMustHaveModificationInfoSpecification;
 }
Пример #5
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;
 }