コード例 #1
0
        public void Should_set_the_output_path_only_for_release_configuration()
        {
            var resultDocument = new OutputPathSetter(_namespaceManager).Set(_projectFile);

            var releasePropertyGroup = resultDocument.SelectSingleNode("/msb:Project/msb:PropertyGroup[msb:OutputPath][contains(@Condition,'Release')]", _namespaceManager);

            var releasePath = releasePropertyGroup
                .SelectSingleNode("msb:OutputPath", _namespaceManager)
                .InnerText;
            Assert.That(releasePath, Is.StringContaining(@"..\..\build\"));
        }
コード例 #2
0
        public void Should_set_output_path_based_on_project_name()
        {
            const string path = @"..\..\build\Wonga.Risk.Handlers.CalculateCreditLimit\";

            var resultDocument = new OutputPathSetter(_namespaceManager).Set(_projectFile);

            var releasePropertyGroup = resultDocument.SelectSingleNode("/msb:Project/msb:PropertyGroup[msb:OutputPath][contains(@Condition,'Release')]", _namespaceManager);

            var releasePath = releasePropertyGroup
                .SelectSingleNode("msb:OutputPath", _namespaceManager)
                .InnerText;
            Assert.That(new DirectoryInfo(releasePath), Is.EqualTo(new DirectoryInfo(path)));
        }
コード例 #3
0
        public void Should_not_set_the_output_path_only_for_other_configurations()
        {
            const string path = @"bin\Debug\";

            var resultDocument = new OutputPathSetter(_namespaceManager).Set(_projectFile);

            var debugPropertyGroup = resultDocument.SelectSingleNode("/msb:Project/msb:PropertyGroup[msb:OutputPath][contains(@Condition,'Debug')]", _namespaceManager);

            var debugPath = debugPropertyGroup
                .SelectSingleNode("msb:OutputPath", _namespaceManager)
                .InnerText;
            Assert.That(debugPath, Is.EqualTo(path));
        }