示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
        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));
        }
示例#5
0
        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");
        }