Пример #1
0
 public ISpecificationModel GenerateModel(ISpecification specification, ITestingFactory testingFactory, string name)
 {
     return(new SpecificationModel(specification, testingFactory, name));
 }
Пример #2
0
        public SpecificationModel(ISpecification specification, ITestingFactory testingFactory, string name)
        {
            name = name.Substring(0, 1).ToUpper() + name.Substring(1, name.Length - 1);

            this._interface     = new TemplateVariable("I" + name, name);
            this.testingFactory = testingFactory;
            this.tier           = Tier.Primary;
            this.variable       = new TemplateVariable(name);

            string keyName = Variable.VariableType.Name + "Key";

            this.keyInterface = new TemplateVariable("I" + keyName, keyName);
            this.keyVariable  = new TemplateVariable(keyName);

            string searchMultipleName = Variable.ListInstanceNameReference + SpecificationModel.Search;

            this.searchMultipleInterface = new TemplateVariable("I" + searchMultipleName, searchMultipleName);
            this.searchMultipleVariable  = new TemplateVariable(searchMultipleName);

            string searchName = Variable.VariableType.Name + SpecificationModel.Search;

            this.searchInterface = new TemplateVariable("I" + searchName, searchName);
            this.searchVariable  = new TemplateVariable(searchName);

            string repositoryName = Variable.VariableType.Name + SpecificationModel.Repository;

            this.repositoryInterface = new TemplateVariable("I" + repositoryName, repositoryName);
            this.repositoryVariable  = new TemplateVariable(repositoryName);

            string serviceName = Variable.VariableType.Name + SpecificationModel.Service;

            this.serviceInterface = new TemplateVariable("I" + serviceName, serviceName);
            this.serviceVariable  = new TemplateVariable(serviceName);

            this.admires                 = new List <IAdmire>();
            this.adoptedChildren         = new List <IAdoptedChild>();
            this.adoptingParents         = new List <IAdoptingParent>();
            this.associates              = new List <IAssociated>();
            this.biologicalChildren      = new List <IBiologicalChild>();
            this.biologicalParents       = new List <IBiologicalParent>();
            this.children                = new List <IChild>();
            this.custodiedChildren       = new List <ICustodiedChild>();
            this.divorces                = new List <IDivorce>();
            this.enemies                 = new List <IEnemy>();
            this.fosterChildren          = new List <IFosterChild>();
            this.fosterParents           = new List <IFosterParent>();
            this.friends                 = new List <IFriend>();
            this.godchildren             = new List <IGodchild>();
            this.godfathers              = new List <IGodfather>();
            this.grandchildren           = new List <IGrandchild>();
            this.grandparents            = new List <IGrandparent>();
            this.isReadOnly              = false;
            this.illegitimateChildren    = new List <IIllegitimateChild>();
            this.illegitimateParents     = new List <IIllegitimateParent>();
            this.marriages               = new List <IMarriage>();
            this.onlyChildren            = new List <IOnlyChild>();
            this.parents                 = new List <IParent>();
            this.recursive               = new List <IRecursive>();
            this.relationships           = new List <IRelationship>();
            this.seperations             = new List <ISeperated>();
            this.siblings                = new List <ISibling>();
            this.significantOthers       = new List <ISignificantOther>();
            this.singleParents           = new List <ISingleParent>();
            this.specificationProperties = new Dictionary <string, ISpecificationProperty>();
            this.unfitParents            = new List <IUnfitParent>();
        }