protected StackLookup LoadPlatformStack(object pHelper)
        {
            HierarchyParallelHelper helper = pHelper as HierarchyParallelHelper;

            if (helper == null)
            {
                return(null);
            }

            StackLookup result = helper.Hierarchy.GeneratePlatformStackLookup(
                DbHelper.GetString(helper.Reader, StackDbTable.NAME_COLUMN),
                DbHelper.GetString(helper.Reader, StackDbTable.CODE_COLUMN),
                DbHelper.GetString(helper.Reader, StackDbTable.DESCRIPTION_COLUMN));

            result.IsLoaded = true;
            return(result);
        }
        private Domain.Profile CreateTestProfile()
        {
            Domain.Profile result = new Domain.Profile();
            result.ProvisioningPlans = new List <ProvisioningPlan>
            {
                new ProvisioningPlan()
            };
            result.ActiveProvisioningPlan = result.ProvisioningPlans[0];

            // ITIC
            InfrastructureLookup     inf = new InfrastructureLookup("III", "Test Infrastructure");
            CapabilityLookup         cap = new CapabilityLookup("SSS", "Test Capability");
            LogicalSystemGroupLookup lsg = new LogicalSystemGroupLookup("LSG8", "Test LSG");

            result.ITICCode = new ITIC(inf, cap, lsg);

            // Platform Stack
            FilterLookup mjf = new FilterLookup("MjF");
            FilterLookup mnf = new FilterLookup("MiF");
            StackLookup  ps  = new StackLookup("WIN_x86_2008R_64_2.7.0_GREEN_SK", "Test Windows 2008 64bit Build 2.7.0", "Test descr");

            result.ActiveProvisioningPlan.PlatformStack = new PlatformStack(mjf, mnf, new FilterLookup("64bit"), new FilterLookup("2.7.0"), ps);

            // Application Stacks
            mjf = new FilterLookup("MjF2");
            mnf = new FilterLookup("MiF2");
            ps  = new StackLookup("TEST_APP_STACK", "Test 2", "Test descr 2");
            result.ActiveProvisioningPlan.ApplicationStacks.Add(new Stack(mjf, mnf, ps));
            mjf = new FilterLookup("MjF3");
            mnf = new FilterLookup("MiF3");
            ps  = new StackLookup("TEST_APP_STACK_3", "Test 3", "Test descr 3");
            result.ActiveProvisioningPlan.ApplicationStacks.Add(new Stack(mjf, mnf, ps));

            // Provisioning Plan Extras
            PlanActionLookup p = new PlanActionLookup()
            {
                Code = "CODE1", Name = "NAME1", Description = "DESc1", IsSelected = true
            };

            result.ActiveProvisioningPlan.InitialWorkflows.Add(p);
            p = new PlanActionLookup()
            {
                Code = "CODE2", Name = "NAME2", Description = "DESc2", IsSelected = true
            };
            result.ActiveProvisioningPlan.CommonPlanActions.Add(p);
            p = new PlanActionLookup()
            {
                Code = "CODE3", Name = "NAME3", Description = "DESc3", IsSelected = true
            };
            result.ActiveProvisioningPlan.FinalWorkflows.Add(p);

            // Post Configuration Actions
            PlanActionLookup pca = new PlanActionLookup()
            {
                Code = "PCA1", Name = "PCA1_NAME1", Description = "PCA1_DESc1", IsSelected = true, IsTextBox = true, DefaultValue = "TEST VALUE"
            };

            result.ActiveProvisioningPlan.AdvancedConfigurationActions.Add(pca);

            return(result);
        }