Ejemplo n.º 1
0
        public void Should_Be_Empty_String_Replacement_When_Null()
        {
            var msCodeCoverageOptions = new TestCoverageProjectOptions
            {
                IncludeTestAssembly = true
            };

            var coverageProject = CreateCoverageProject(mock => mock.Setup(cp => cp.Settings).Returns(msCodeCoverageOptions));
            var replacements    = runSettingsTemplateReplacementsFactory.Create(coverageProject, null);


            ReplacementsAssertions.AssertAllEmpty(replacements);
        }
Ejemplo n.º 2
0
        public void Should_Be_Empty_String_Replacement_When_Null()
        {
            var testContainers = new List <ITestContainer>()
            {
                CreateTestContainer("Source1"),
                CreateTestContainer("Source2")
            };

            Dictionary <string, IUserRunSettingsProjectDetails> userRunSettingsProjectDetailsLookup = new Dictionary <string, IUserRunSettingsProjectDetails>
            {
                {
                    "Source1",
                    new TestUserRunSettingsProjectDetails
                    {
                        CoverageOutputFolder = "",
                        Settings             = new TestMsCodeCoverageOptions {
                            IncludeTestAssembly = true
                        },
                        ExcludedReferencedProjects = new List <string>(),
                        IncludedReferencedProjects = new List <string>(),
                    }
                },
                {
                    "Source2",
                    new TestUserRunSettingsProjectDetails
                    {
                        CoverageOutputFolder = "",
                        Settings             = new TestMsCodeCoverageOptions {
                            IncludeTestAssembly = true
                        },
                        ExcludedReferencedProjects = new List <string>(),
                        IncludedReferencedProjects = new List <string>(),
                    }
                }
            };
            var replacements = runSettingsTemplateReplacementsFactory.Create(testContainers, userRunSettingsProjectDetailsLookup, null);

            ReplacementsAssertions.AssertAllEmpty(replacements);
        }