コード例 #1
0
        public static void DeterminesVisualStudioFolder(string version, string subfolder)
        {
            // arrange
            var root = "root";
            var msbuild = new Derived { MSBuildVersion = version, MSBuildArchitecture = ProcessorArchitecture.Amd64 };
            var expectedFilename = Path.Combine(root, "MSBuild", subfolder, "bin", "amd64", "MSBuild.exe");

            // act
            var startInfo = msbuild.GetStartInfoVisualStudio(root);

            // assert
            startInfo.FileName.Should().Be(expectedFilename);
        }
コード例 #2
0
        public static void DeterminesVisualStudioFolderPerArchitecture(
            ProcessorArchitecture architecture, bool is64BitOperatingSystem, bool expect64Bit)
        {
            // arrange
            var root = "root";
            var msbuild = new Derived { MSBuildVersion = "vs12", MSBuildArchitecture = architecture };
            var expectedFilename = expect64Bit
                ? Path.Combine(root, "MSBuild", "12.0", "bin", "amd64", "MSBuild.exe")
                : Path.Combine(root, "MSBuild", "12.0", "bin", "MSBuild.exe");

            // act
            var startInfo = msbuild.GetStartInfoVisualStudio(root, is64BitOperatingSystem);

            // assert
            startInfo.FileName.Should().Be(expectedFilename);
        }