public static InsuredPerson CreateNew(int depth = 0)
        {
            rt.srz.model.srz.InsuredPerson entity = new rt.srz.model.srz.InsuredPerson();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.MainPolisNumber = "Tes";

            using (rt.srz.business.manager.IDeadInfoManager deadInfoManager = ObjectFactory.GetInstance <IDeadInfoManager>())
            {
                entity.DeadInfo = null;
            }

            using (rt.srz.business.manager.IConceptManager conceptManager = ObjectFactory.GetInstance <IConceptManager>())
            {
                var     all       = conceptManager.GetAll(1);
                Concept entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = ConceptTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Status = entityRef;
            }

            return(entity);
        }
        public static Period CreateNew(int depth = 0)
        {
            rt.srz.model.srz.Period entity = new rt.srz.model.srz.Period();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.Year = System.DateTime.Now;

            using (rt.srz.business.manager.IConceptManager conceptManager = ObjectFactory.GetInstance <IConceptManager>())
            {
                var     all       = conceptManager.GetAll(1);
                Concept entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = ConceptTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Code = entityRef;
            }

            return(entity);
        }
Exemple #3
0
        public static UserAction CreateNew(int depth = 0)
        {
            rt.srz.model.srz.UserAction entity = new rt.srz.model.srz.UserAction();


            entity.UserId = new Guid("01000000-0000-0000-0000-000000000000");

            using (rt.srz.business.manager.IConceptManager conceptManager = ObjectFactory.GetInstance <IConceptManager>())
            {
                var     all       = conceptManager.GetAll(1);
                Concept entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = ConceptTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Event = entityRef;
            }

            using (rt.srz.business.manager.IStatementManager statementManager = ObjectFactory.GetInstance <IStatementManager>())
            {
                entity.Statement = null;
            }

            return(entity);
        }
        public static Message CreateNew(int depth = 0)
        {
            rt.srz.model.srz.Message entity = new rt.srz.model.srz.Message();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.IsCommit = true;
            entity.IsError  = true;

            using (rt.srz.business.manager.IBatchManager batchManager = ObjectFactory.GetInstance <IBatchManager>())
            {
                var   all       = batchManager.GetAll(1);
                Batch entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = BatchTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Batch = entityRef;
            }

            using (rt.srz.business.manager.IMessageManager messageMemberManager = ObjectFactory.GetInstance <IMessageManager>())
            {
                entity.DependsOnMessage = null;
            }

            using (rt.srz.business.manager.IConceptManager concept1Manager = ObjectFactory.GetInstance <IConceptManager>())
            {
                entity.Reason = null;
            }

            using (rt.srz.business.manager.IConceptManager concept2Manager = ObjectFactory.GetInstance <IConceptManager>())
            {
                var     all       = concept2Manager.GetAll(1);
                Concept entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = ConceptTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Type = entityRef;
            }

            return(entity);
        }
        protected rt.srz.model.srz.Concept GetFirstConcept()
        {
            IList <rt.srz.model.srz.Concept> entityList = manager.GetAll(1);

            if (entityList.Count == 0)
            {
                Assert.Fail("All tables must have at least one row for unit tests to succeed.");
            }
            return(entityList[0]);
        }
Exemple #6
0
        public static MessageStatement CreateNew(int depth = 0)
        {
            rt.srz.model.srz.MessageStatement entity = new rt.srz.model.srz.MessageStatement();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.Version = 48;

            using (rt.srz.business.manager.IConceptManager conceptManager = ObjectFactory.GetInstance <IConceptManager>())
            {
                var     all       = conceptManager.GetAll(1);
                Concept entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = ConceptTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Type = entityRef;
            }

            using (rt.srz.business.manager.IMessageManager messageManager = ObjectFactory.GetInstance <IMessageManager>())
            {
                entity.Message = null;
            }

            using (rt.srz.business.manager.IStatementManager statementManager = ObjectFactory.GetInstance <IStatementManager>())
            {
                var       all       = statementManager.GetAll(1);
                Statement entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = StatementTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Statement = entityRef;
            }

            return(entity);
        }
Exemple #7
0
        public static SertificateUec CreateNew(int depth = 0)
        {
            rt.srz.model.srz.SertificateUec entity = new rt.srz.model.srz.SertificateUec();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.Key         = new System.Byte[] {};
            entity.Version     = default(Int16);
            entity.IsActive    = true;
            entity.InstallDate = System.DateTime.Now;

            using (rt.srz.business.manager.IConceptManager conceptManager = ObjectFactory.GetInstance <IConceptManager>())
            {
                var     all       = conceptManager.GetAll(1);
                Concept entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = ConceptTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Type = entityRef;
            }

            using (rt.srz.business.manager.IOrganisationManager organisationManager = ObjectFactory.GetInstance <IOrganisationManager>())
            {
                entity.Smo = null;
            }

            using (rt.srz.business.manager.IWorkstationManager workstationManager = ObjectFactory.GetInstance <IWorkstationManager>())
            {
                entity.Workstation = null;
            }

            return(entity);
        }
        public static Content CreateNew(int depth = 0)
        {
            rt.srz.model.srz.Content entity = new rt.srz.model.srz.Content();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.DocumentContent   = new System.Byte[] {};
            entity.ChangeDate        = System.DateTime.Now;
            entity.FileName          = "Test Test Test Test Test Test Test Test Test Te";
            entity.DocumentContent64 = "Test T";

            using (rt.srz.business.manager.IConceptManager conceptManager = ObjectFactory.GetInstance <IConceptManager>())
            {
                var     all       = conceptManager.GetAll(1);
                Concept entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = ConceptTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.ContentType = entityRef;
            }

            using (rt.srz.business.manager.IInsuredPersonDatumManager insuredPersonDatumManager = ObjectFactory.GetInstance <IInsuredPersonDatumManager>())
            {
                entity.InsuredPersonData = null;
            }

            return(entity);
        }
Exemple #9
0
        public static AutoComplete CreateNew(int depth = 0)
        {
            rt.srz.model.srz.AutoComplete entity = new rt.srz.model.srz.AutoComplete();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.Name      = "Test Test ";
            entity.Relevance = 44;

            using (rt.srz.business.manager.IConceptManager concept1Manager = ObjectFactory.GetInstance <IConceptManager>())
            {
                entity.Gender = null;
            }

            using (rt.srz.business.manager.IConceptManager concept2Manager = ObjectFactory.GetInstance <IConceptManager>())
            {
                var     all       = concept2Manager.GetAll(1);
                Concept entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = ConceptTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Type = entityRef;
            }

            return(entity);
        }
Exemple #10
0
        public static Batch CreateNew(int depth = 0)
        {
            rt.srz.model.srz.Batch entity = new rt.srz.model.srz.Batch();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.FileName = "Test Test Test Test Test Test Test Test Test Test Test Test Tes";
            entity.Number   = default(Int16);

            using (rt.srz.business.manager.IConceptManager concept1Manager = ObjectFactory.GetInstance <IConceptManager>())
            {
                entity.CodeConfirm = null;
            }

            using (rt.srz.business.manager.IConceptManager concept2Manager = ObjectFactory.GetInstance <IConceptManager>())
            {
                var     all       = concept2Manager.GetAll(1);
                Concept entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = ConceptTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Subject = entityRef;
            }

            using (rt.srz.business.manager.IConceptManager concept3Manager = ObjectFactory.GetInstance <IConceptManager>())
            {
                var     all       = concept3Manager.GetAll(1);
                Concept entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = ConceptTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Type = entityRef;
            }

            using (rt.srz.business.manager.IPeriodManager periodManager = ObjectFactory.GetInstance <IPeriodManager>())
            {
                entity.Period = null;
            }

            using (rt.srz.business.manager.IOrganisationManager organisation1Manager = ObjectFactory.GetInstance <IOrganisationManager>())
            {
                entity.Receiver = null;
            }

            using (rt.srz.business.manager.IOrganisationManager organisation2Manager = ObjectFactory.GetInstance <IOrganisationManager>())
            {
                entity.Sender = null;
            }

            return(entity);
        }
Exemple #11
0
        public static In1 CreateNew(int depth = 0)
        {
            rt.srz.model.srz.In1 entity = new rt.srz.model.srz.In1();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.Number      = default(Int16);
            entity.PolisSeria  = "Te";
            entity.PolisNumber = "Test Test Te";
            entity.DateFrom    = System.DateTime.Now;
            entity.DateTo      = System.DateTime.Now;
            entity.DateStop    = System.DateTime.Now;

            using (rt.srz.business.manager.IQueryResponseManager queryResponseManager = ObjectFactory.GetInstance <IQueryResponseManager>())
            {
                var           all       = queryResponseManager.GetAll(1);
                QueryResponse entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = QueryResponseTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.QueryResponse = entityRef;
            }

            using (rt.srz.business.manager.IConceptManager conceptManager = ObjectFactory.GetInstance <IConceptManager>())
            {
                var     all       = conceptManager.GetAll(1);
                Concept entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = ConceptTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.PolisType = entityRef;
            }

            using (rt.srz.business.manager.IOrganisationManager organisationManager = ObjectFactory.GetInstance <IOrganisationManager>())
            {
                var          all       = organisationManager.GetAll(1);
                Organisation entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = OrganisationTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Smo = entityRef;
            }

            return(entity);
        }
Exemple #12
0
        public static SearchKeyType CreateNew(int depth = 0)
        {
            rt.srz.model.srz.SearchKeyType entity = new rt.srz.model.srz.SearchKeyType();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.Code                 = "123";
            entity.Name                 = "Test Test Test Test Test Test Test Test Test";
            entity.IsActive             = true;
            entity.FirstName            = true;
            entity.LastName             = true;
            entity.MiddleName           = true;
            entity.Birthday             = true;
            entity.Birthplace           = true;
            entity.Snils                = true;
            entity.DocumentType         = true;
            entity.DocumentSeries       = true;
            entity.DocumentNumber       = true;
            entity.Okato                = true;
            entity.PolisType            = true;
            entity.PolisSeria           = true;
            entity.PolisNumber          = true;
            entity.FirstNameLength      = default(Int16);
            entity.LastNameLength       = default(Int16);
            entity.MiddleNameLength     = default(Int16);
            entity.BirthdayLength       = default(Int16);
            entity.AddressStreet        = true;
            entity.AddressStreetLength  = default(Int16);
            entity.AddressHouse         = true;
            entity.AddressRoom          = true;
            entity.AddressStreet2       = true;
            entity.AddressStreetLength2 = default(Int16);
            entity.AddressHouse2        = true;
            entity.AddressRoom2         = true;
            entity.DeleteTwinChar       = true;
            entity.IdenticalLetters     = "Test Test ";
            entity.Recalculated         = true;
            entity.Enp       = true;
            entity.MainEnp   = true;
            entity.Weight    = 76;
            entity.Insertion = true;

            using (rt.srz.business.manager.IConceptManager conceptManager = ObjectFactory.GetInstance <IConceptManager>())
            {
                var     all       = conceptManager.GetAll(1);
                Concept entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = ConceptTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.OperationKey = entityRef;
            }

            using (rt.srz.business.manager.IOrganisationManager organisationManager = ObjectFactory.GetInstance <IOrganisationManager>())
            {
                entity.Tfoms = null;
            }

            return(entity);
        }
        public static MedicalInsurance CreateNew(int depth = 0)
        {
            rt.srz.model.srz.MedicalInsurance entity = new rt.srz.model.srz.MedicalInsurance();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.PolisSeria    = "Test Test Test Te";
            entity.PolisNumber   = "Test Test Test Test";
            entity.DateFrom      = System.DateTime.Now;
            entity.DateTo        = System.DateTime.Now;
            entity.IsActive      = true;
            entity.DateStop      = System.DateTime.Now;
            entity.Enp           = "T";
            entity.StateDateFrom = System.DateTime.Now;
            entity.StateDateTo   = System.DateTime.Now;

            using (rt.srz.business.manager.IInsuredPersonManager insuredPersonManager = ObjectFactory.GetInstance <IInsuredPersonManager>())
            {
                entity.InsuredPerson = null;
            }

            using (rt.srz.business.manager.IConceptManager conceptManager = ObjectFactory.GetInstance <IConceptManager>())
            {
                var     all       = conceptManager.GetAll(1);
                Concept entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = ConceptTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.PolisType = entityRef;
            }

            using (rt.srz.business.manager.IOrganisationManager organisationManager = ObjectFactory.GetInstance <IOrganisationManager>())
            {
                var          all       = organisationManager.GetAll(1);
                Organisation entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = OrganisationTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Smo = entityRef;
            }

            using (rt.srz.business.manager.IStatementManager statementManager = ObjectFactory.GetInstance <IStatementManager>())
            {
                var       all       = statementManager.GetAll(1);
                Statement entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = StatementTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Statement = entityRef;
            }

            return(entity);
        }
Exemple #14
0
        public static Statement CreateNew(int depth = 0)
        {
            rt.srz.model.srz.Statement entity = new rt.srz.model.srz.Statement();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.DateFiling       = System.DateTime.Now;
            entity.HasPetition      = true;
            entity.NumberPolicy     = "Test";
            entity.AbsentPrevPolicy = true;
            entity.IsActive         = true;
            entity.PolicyIsIssued   = true;
            entity.PrzBuffId        = 19;
            entity.PidId            = 31;
            entity.PolisId          = 90;
            entity.IsExportTemp     = true;
            entity.IsExportPolis    = true;
            entity.PrzBuffPolisId   = 9;
            entity.Version          = 16;
            entity.UserId           = new Guid("01000000-0000-0000-0000-000000000000");

            using (rt.srz.business.manager.IOrganisationManager organisationManager = ObjectFactory.GetInstance <IOrganisationManager>())
            {
                entity.PointDistributionPolicy = null;
            }

            using (rt.srz.business.manager.IStatementManager statementMemberManager = ObjectFactory.GetInstance <IStatementManager>())
            {
                entity.PreviousStatement = null;
            }

            using (rt.srz.business.manager.IConceptManager concept1Manager = ObjectFactory.GetInstance <IConceptManager>())
            {
                var     all       = concept1Manager.GetAll(1);
                Concept entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = ConceptTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Status = entityRef;
            }

            using (rt.srz.business.manager.IInsuredPersonDatumManager insuredPersonDatumManager = ObjectFactory.GetInstance <IInsuredPersonDatumManager>())
            {
                entity.InsuredPersonData = null;
            }

            using (rt.srz.business.manager.IInsuredPersonManager insuredPersonManager = ObjectFactory.GetInstance <IInsuredPersonManager>())
            {
                entity.InsuredPerson = null;
            }

            using (rt.srz.business.manager.IConceptManager concept2Manager = ObjectFactory.GetInstance <IConceptManager>())
            {
                entity.CauseFiling = null;
            }

            using (rt.srz.business.manager.IConceptManager concept3Manager = ObjectFactory.GetInstance <IConceptManager>())
            {
                entity.ModeFiling = null;
            }

            using (rt.srz.business.manager.IConceptManager concept4Manager = ObjectFactory.GetInstance <IConceptManager>())
            {
                entity.FormManufacturing = null;
            }

            using (rt.srz.business.manager.IDocumentManager document1Manager = ObjectFactory.GetInstance <IDocumentManager>())
            {
                entity.DocumentUdl = null;
            }

            using (rt.srz.business.manager.IContactInfoManager contactInfoManager = ObjectFactory.GetInstance <IContactInfoManager>())
            {
                entity.ContactInfo = null;
            }

            using (rt.srz.business.manager.IRepresentativeManager representativeManager = ObjectFactory.GetInstance <IRepresentativeManager>())
            {
                entity.Representative = null;
            }

            using (rt.srz.business.manager.IDocumentManager document2Manager = ObjectFactory.GetInstance <IDocumentManager>())
            {
                entity.ResidencyDocument = null;
            }

            using (rt.srz.business.manager.IaddressManager address1Manager = ObjectFactory.GetInstance <IaddressManager>())
            {
                entity.Address = null;
            }

            using (rt.srz.business.manager.IDocumentManager document3Manager = ObjectFactory.GetInstance <IDocumentManager>())
            {
                entity.DocumentRegistration = null;
            }

            using (rt.srz.business.manager.IaddressManager address2Manager = ObjectFactory.GetInstance <IaddressManager>())
            {
                entity.Address2 = null;
            }

            return(entity);
        }