public void ProcessParameterDeserializer_ConvertsExportedAgentSettings_Git() { var agentSettings = new BuildParameter { Json = @"{""unknown"": ""please help""}" }; var expBuildDef = this.Serialize(new { GitAgentSettings = agentSettings }); var procParam = new[] { "AgentSettings", expBuildDef }; ExportedProcessParameterTransformer.ProcessParameterDeserializer(procParam).ShouldBeEquivalentTo(agentSettings); }
public void ProcessParameterDeserializer_ConvertsExportedBuildSettings() { var buildSettings = new BuildSettings { PlatformConfigurations = PlatformConfigurationList.Default, ProjectsToBuild = new StringList("projectA,projectB") }; var expBuildDef = this.Serialize(new { ProjectsToBuild = buildSettings.ProjectsToBuild, ConfigurationsToBuild = buildSettings.PlatformConfigurations }); var procParam = new[] { "BuildSettings", expBuildDef }; ExportedProcessParameterTransformer.ProcessParameterDeserializer(procParam).ShouldBeEquivalentTo(buildSettings); }
public void ProcessParameterDeserializer_ConvertsExportedAgentSettings_TFS() { var agentSettings = new AgentSettings { TagComparison = TagComparison.MatchExactly, MaxExecutionTime = TimeSpan.MaxValue, MaxWaitTime = TimeSpan.MaxValue, Name = "test", Tags = new StringList("tagA,tagB") }; var expBuildDef = this.Serialize(new { TfvcAgentSettings = (AgentSettingsBuildParameter)agentSettings }); var procParam = new[] { "AgentSettings", expBuildDef }; ExportedProcessParameterTransformer.ProcessParameterDeserializer(procParam).ShouldBeEquivalentTo(agentSettings); }
public void ProcessParameterDeserializer_ConvertsExportedTestSpec() { var testSpec = new AgileTestPlatformSpec { AssemblyFileSpec = @"**\*.Tests.dll", ExecutionPlatform = ExecutionPlatformType.X86, FailBuildOnFailure = true, RunName = "Unit Tests", RunSettingsForTestRun = new RunSettings { ServerRunSettingsFile = "run.settings", TypeRunSettings = RunSettingsType.CodeCoverageEnabled }, TestCaseFilter = "*FakeTests" }; var procParam = new[] { "AgileTestSpecs", this.Serialize(new ExportedAgileTestPlatformSpec[] { testSpec }) }; ExportedProcessParameterTransformer.ProcessParameterDeserializer(procParam).ShouldBeEquivalentTo(new TestSpecList(testSpec)); }
public void ProcessParameterDeserializer_PassesStringsStraightThrough() { var procParam = new[] { "anything custom", "should go straight through" }; Assert.AreEqual(procParam[1], ExportedProcessParameterTransformer.ProcessParameterDeserializer(procParam), "because non special params should pass straight through the deserializer"); }