public void TestChangeCase() { var container = BuildContainer("deployment_select.tdl"); var deployment = container.GetAll <DeploymentSelectModel>().Single(); deployment.Cases.Single(c => c.DeploymentCase == "KAV").DeploymentCase = "KIS"; var expectedTdl = GetExpectedTdl("deployment_select_change_case.tdl"); var actualTdl = deployment.Print(); TdlAssert.AreEqual(expectedTdl, actualTdl); }
public void TestRemoveCase() { var container = BuildContainer("deployment_select.tdl"); var deployment = container.GetAll <DeploymentSelectModel>().Single(); deployment.Cases.RemoveAll(c => c.DeploymentCase == null); var expectedTdl = GetExpectedTdl("deployment_select_remove_case.tdl"); var actualTdl = deployment.Print(); TdlAssert.AreEqual(expectedTdl, actualTdl); }
public void TestChangeOrderParameters() { var container = BuildContainer("deployment_script.tdl"); var deployment = container.GetAll <DeploymentScriptModel>().Single(); deployment.Parameters.Sort(ComparisonParameters); var expectedTdl = GetExpectedTdl("deployment_script_change_order_parameters.tdl"); var actualTdl = deployment.Print(); TdlAssert.AreEqual(expectedTdl, actualTdl); }
public void TestChangeTimeout() { var container = BuildContainer("deployment_reboot.tdl"); var deployment = container.GetAll <DeploymentRebootModel>().Single(); deployment.RebootTimeout = "00:20:00"; var expectedTdl = GetExpectedTdl("deployment_reboot_change_timeout.tdl"); var actualTdl = container.GetPrintable().FirstOrDefault().Print(); TdlAssert.AreEqual(expectedTdl, actualTdl); }
public void TestAddNewCase() { var container = BuildContainer("deployment_select.tdl", "deployment_select_new_case.tdl"); var deployment = container.GetAll <DeploymentSelectModel>().Single(d => d.Name == "Install product"); var deploymentNew = container.GetAll <DeploymentSelectModel>().Single(d => d.Name == "_Install PURE"); deployment.Cases.AddRange(deploymentNew.Cases); var expectedTdl = GetExpectedTdl("deployment_select_add_new_case.tdl"); var actualTdl = deployment.Print(); TdlAssert.AreEqual(expectedTdl, actualTdl); }
public void TestChangeReference() { var container = BuildContainer("deployment_select.tdl", "deployment_select_new_reference.tdl"); var deployment = container.GetAll <DeploymentSelectModel>().Single(); var deploymentNew = container.GetAll <DeploymentScriptModel>().Single(d => d.Name == "_Install SAAS"); deployment.Cases.Single(c => c.Deployments.First().Name == "Install SAAS").Deployments = ImmutableArray.Create(deploymentNew); var expectedTdl = GetExpectedTdl("deployment_select_change_reference.tdl"); var actualTdl = deployment.Print(); TdlAssert.AreEqual(expectedTdl, actualTdl); }
public void TestChangeBaseDeployment() { var container = BuildContainer("deployment_currying.tdl", "deployment_currying_new_deployment.tdl"); var deployment = container.GetAll <DeploymentCurryingModel>().Single(); var deploymentNewBase = container.GetAll <CurryingApplicableDeployment>().Single(d => d.Name == "Deploy product"); deployment.BaseDeployment = deploymentNewBase; var expectedTdl = GetExpectedTdl("deployment_currying_change_base_deployment.tdl"); var actualTdl = deployment.Print(); TdlAssert.AreEqual(expectedTdl, actualTdl); }
public void TestChangeValueParameters() { var container = BuildContainer("deployment_currying.tdl"); var deployment = container.GetAll <DeploymentCurryingModel>().Single(); deployment.Parameters.Single(p => p.Name == "ActivateEmbeddedTrial").Expression = new False(); deployment.Parameters.Single(p => p.Name == "InstallLicenceBackdoor").Expression = new String("On"); var expectedTdl = GetExpectedTdl("deployment_currying_change_value_parameters.tdl"); var actualTdl = deployment.Print(); TdlAssert.AreEqual(expectedTdl, actualTdl); }
public void TestChangeScript() { var container = BuildContainer("deployment_script.tdl", "deployment_script_new_script.tdl"); var deployment = container.GetAll <DeploymentScriptModel>().Single(d => d.Name == "_Install product"); var deploymentNewScript = container.GetAll <DeploymentScriptModel>().Single(d => d.Name == "Deploy with new script"); deployment.ScriptReference = deploymentNewScript.ScriptReference; var expectedTdl = GetExpectedTdl("deployment_script_change_script.tdl"); var actualTdl = deployment.Print(); TdlAssert.AreEqual(expectedTdl, actualTdl); }
public void TestChangeItem() { var container = BuildContainer("deployment_set.tdl", "deployment_set_new_item.tdl"); var deployment = container.GetAll <DeploymentSetModel>().Single(d => d.Name == "Deploy composite"); var deploymentSetNewMember = container.GetAll <DeploymentSetModel>().Single(d => d.Name == "Copy Comodo and run"); deployment.Members.RemoveAll(d => d.Model.Name == "Copy Comodo" || d.Model.Name == "Run Comodo"); deployment.Members.AddRange(deploymentSetNewMember.Members); var expectedTdl = GetExpectedTdl("deployment_set_change_item.tdl"); var actualTdl = deployment.Print(); TdlAssert.AreEqual(expectedTdl, actualTdl); }
public void TestChangeCountParameters() { var deployments = BuildContainer("deployment_currying.tdl", "deployment_currying_new_parameters.tdl").GetAll <DeploymentCurryingModel>(); var deployment = deployments.Single(d => d.Name == "Install product"); var deploymentAdditional = deployments.Single(d => d.Name == "Additional deploy"); deployment.Parameters.RemoveAll(p => p.Name == "RunAtSystemStartup" || p.Name == "InstallLicenceBackdoor"); deployment.Parameters.AddRange(deploymentAdditional.Parameters); var expectedTdl = GetExpectedTdl("deployment_currying_change_count_parameters.tdl"); var actualTdl = deployment.Print(); TdlAssert.AreEqual(expectedTdl, actualTdl); }
public void TestChangeNameParameters() { var container = BuildContainer("deployment_script.tdl"); var deployment = container.GetAll <DeploymentScriptModel>().Single(); deployment.Parameters.Single(p => p.Name == "DumpFolder").Name = "DumpPath"; deployment.Parameters.Single(p => p.Name == "SetProductNameForFacade").Name = "UseFacade"; deployment.Parameters.Single(p => p.Name == "UseCollections").Name = "MountAdditionalFiles"; var expectedTdl = GetExpectedTdl("deployment_script_change_name_parameters.tdl"); var actualTdl = deployment.Print(); TdlAssert.AreEqual(expectedTdl, actualTdl); }
public void TestChangeTypeParameters() { var container = BuildContainer("deployment_script.tdl"); var deployment = container.GetAll <DeploymentScriptModel>().Single(); ChangeTypeAndValue(deployment, "ActivateEmbeddedTrial", "string", "Off"); ChangeTypeAndValue(deployment, "ActivationCode", "int", "1234"); ChangeTypeAndValue(deployment, "InstallLicenceBackdoor", "bool", "true"); ChangeTypeAndValue(deployment, "TimesToUpdate", "string", "1"); var expectedTdl = GetExpectedTdl("deployment_script_change_type_parameters.tdl"); var actualTdl = deployment.Print(); TdlAssert.AreEqual(expectedTdl, actualTdl); }
public void TestChangeDefaultValueParameters() { var container = BuildContainer("deployment_script.tdl"); var deployment = container.GetAll <DeploymentScriptModel>().Single(); deployment.Parameters.Single(p => p.Name == "BuildPath").Value = @"$(SessionWorkFolder)\Build"; deployment.Parameters.Single(p => p.Name == "AcceptSocializationAgreement").Value = "Off"; deployment.Parameters.Single(p => p.Name == "AdditionalFiles").Value = ""; deployment.Parameters.Single(p => p.Name == "DisableProductInstallation").Value = "true"; deployment.Parameters.Single(p => p.Name == "TimesToUpdate").Value = "2"; var expectedTdl = GetExpectedTdl("deployment_script_change_default_value_parameters.tdl"); var actualTdl = deployment.Print(); TdlAssert.AreEqual(expectedTdl, actualTdl); }
public void TestChangeCountParameters() { var deployments = BuildContainer("deployment_script.tdl", "deployment_script_new_parameters.tdl").GetAll <DeploymentScriptModel>(); var deployment = deployments.Single(d => d.Name == "_Install product"); var deploymentAccessory = deployments.Single(d => d.Name == "Deploy with new parameters"); deployment.Parameters.RemoveAll(p => p.Name == "TestArtefactsFolder" || p.Name == "DumpFolder" || p.Name == "AdditionalFiles" || p.Name == "InstallLicenceBackdoor" || p.Name == "TimesToUpdate" || p.Name == "UseCollections"); deployment.Parameters.AddRange(deploymentAccessory.Parameters); var expectedTdl = GetExpectedTdl("deployment_script_change_count_parameters.tdl"); var actualTdl = deployment.Print(); TdlAssert.AreEqual(expectedTdl, actualTdl); }