Ejemplo n.º 1
0
        public void Setup()
        {
            _transactionScope          = new TransactionScope();
            _houseHoldingRunRepository = new HouseHoldingRunRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString);

            _domicile    = BuildMeA.Domicile("code", "description");
            _docType     = BuildMeA.DocType("code", "description");
            _subDocType1 = BuildMeA.SubDocType("code 1", "description 1").WithDocType(_docType);
            _manCo1      = BuildMeA.ManCo("description1", "code1").WithDomicile(_domicile);
            _manCo2      = BuildMeA.ManCo("description2", "code2").WithDomicile(_domicile);
        }
Ejemplo n.º 2
0
        public void Setup()
        {
            _transactionScope          = new TransactionScope();
            _documentRepository        = new DocumentRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString);
            _gridRunRepository         = new GridRunRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString);
            _xmlFileRepository         = new XmlFileRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString);
            _houseHoldingRunRepository = new HouseHoldingRunRepository(ConfigurationManager.ConnectionStrings["Unity"].ConnectionString);

            _domicile = BuildMeA.Domicile("code", "description");
            _manCo1   = BuildMeA.ManCo("description1", "code1").WithDomicile(_domicile);
            _manCo2   = BuildMeA.ManCo("description2", "code2").WithDomicile(_domicile);
            _manCo3   = BuildMeA.ManCo("description3", "code3").WithDomicile(_domicile);
            _docType  = BuildMeA.DocType("code", "description");
            _docType2 = BuildMeA.DocType("code2", "description2");
            _docType3 = BuildMeA.DocType("code3", "description3");

            _application1 = new Application("code", "description");

            _subDocType1     = BuildMeA.SubDocType("code 1", "description 1").WithDocType(_docType);
            _subDocType2     = BuildMeA.SubDocType("code 2", "description 3").WithDocType(_docType);
            _houseHoldingRun = BuildMeA.HouseHoldingRun(DateTime.Now.AddMinutes(-10), DateTime.Now.AddMinutes(-2), "grid");

            _approval1 = BuildMeA.Approval("name", DateTime.Now);
            _approval2 = BuildMeA.Approval("name", DateTime.Now);
            _approval3 = BuildMeA.Approval("name", DateTime.Now);
            _approval4 = BuildMeA.Approval("name", DateTime.Now);
            _approval5 = BuildMeA.Approval("name", DateTime.Now);
            _export    = BuildMeA.Export(DateTime.Now);

            _rejection = BuildMeA.Rejection("user", DateTime.Now);

            _document  = BuildMeA.Document("id").WithDocType(_docType).WithSubDocType(_subDocType1).WithManCo(_manCo1).WithApproval(_approval4);                       //.WithGridRun(_gridRun);
            _document2 = BuildMeA.Document("id2").WithDocType(_docType2).WithSubDocType(_subDocType2).WithManCo(_manCo2).WithApproval(_approval5);                     //.WithGridRun(_gridRun2);
            _document3 = BuildMeA.Document("id3").WithDocType(_docType2).WithSubDocType(_subDocType1).WithManCo(_manCo3);                                              //.WithGridRun(_gridRun3);
            _document4 = BuildMeA.Document("id4").WithDocType(_docType3).WithSubDocType(_subDocType2).WithManCo(_manCo2);                                              //.WithGridRun(_gridRun4);

            _document5 = BuildMeA.Document("id5").WithDocType(_docType2).WithSubDocType(_subDocType1).WithManCo(_manCo1).WithApproval(_approval1).WithExport(_export); //.WithGridRun(_gridRun);
            _document6 = BuildMeA.Document("id6").WithDocType(_docType3).WithSubDocType(_subDocType2).WithManCo(_manCo3);                                              //.WithGridRun(_gridRun2);
            _document7 = BuildMeA.Document("id7").WithDocType(_docType2).WithSubDocType(_subDocType2).WithManCo(_manCo3).WithApproval(_approval2);                     //.WithGridRun(_gridRun3);
            _document8 = BuildMeA.Document("id8").WithDocType(_docType2).WithSubDocType(_subDocType2).WithManCo(_manCo3).WithApproval(_approval3);                     //.WithGridRun(_gridRun4);
            _document9 = BuildMeA.Document("id9").WithDocType(_docType2).WithSubDocType(_subDocType2).WithManCo(_manCo3).WithRejection(_rejection);

            _grid  = BuildMeA.GridRun("grid", false, DateTime.Now, DateTime.Now, 1).WithApplication(_application1).WithDocument(_document).WithDocument(_document2).WithDocument(_document3);
            _grid1 = BuildMeA.GridRun("grid1", false, DateTime.Now, DateTime.Now, 1).WithApplication(_application1).WithDocument(_document4).WithDocument(_document5);
            _grid2 = BuildMeA.GridRun("grid2", false, DateTime.Now, DateTime.Now, 1).WithApplication(_application1).WithDocument(_document6).WithDocument(_document7).WithDocument(_document8);

            _gridRun  = BuildMeA.GridRun("grid1", true, new DateTime(2014, 3, 1), new DateTime(2014, 3, 1), 3).WithApplication(_application1).WithDocument(_document).WithDocument(_document5).WithDocument(_document6).WithDocument(_document9);
            _gridRun2 = BuildMeA.GridRun("grid2", true, new DateTime(2014, 3, 1), new DateTime(2014, 3, 1), 3).WithApplication(_application1).WithDocument(_document2).WithDocument(_document6);
            _gridRun3 = BuildMeA.GridRun("grid3", true, new DateTime(2014, 3, 1), new DateTime(2014, 3, 1), 3).WithApplication(_application1).WithDocument(_document3).WithDocument(_document7);
            _gridRun4 = BuildMeA.GridRun("grid4", true, new DateTime(2014, 1, 1), new DateTime(2014, 1, 1), 3).WithApplication(_application1).WithDocument(_document4);

            _xmlFileOffShore =
                BuildMeA.XmlFile("documentSetId 1", "fileName 1", "parentFileName 1", true, DateTime.Now, DateTime.Now)
                .WithGridRun(_grid)
                .WithDocType(_docType)
                .WithDomicile(_domicile)
                .WithManCo(_manCo1);;

            _xmlFileOnShore =
                BuildMeA.XmlFile("documentSetId 2", "fileName 2", "parentFileName 2", false, DateTime.Now, DateTime.Now)
                .WithGridRun(_grid1)
                .WithGridRun(_grid2)
                .WithDocType(_docType)
                .WithDomicile(_domicile)
                .WithManCo(_manCo1);;
        }