Ejemplo n.º 1
0
        public void GenerationIsCorrect()
        {
            this.SetupTest("NuGetPackagesDetectedFromParentWithRootPathDot");

            this.Generate("Windows");

            _assert.True(File.Exists(this.GetPath(@"Module.Windows.sln")));
            _assert.True(File.Exists(this.GetPath(@"Submodule\Module.Windows.sln")));
            _assert.True(File.Exists(this.GetPath(@"Submodule\Console.Windows.csproj")));

            var consoleContents = this.ReadFile(@"Submodule\Console.Windows.csproj");

            _assert.Contains("portable-net4+sl5+wp8+win8+wpa81+MonoTouch+MonoAndroid", consoleContents);
            _assert.Contains("Test.dll", consoleContents);
            _assert.Contains("<HintPath>..\\packages", consoleContents);
            _assert.DoesNotContain("<HintPath>packages", consoleContents);
            _assert.DoesNotContain("<HintPath>..\\..\\packages", consoleContents);
        }
        public void GenerationIsCorrect()
        {
            this.SetupTest("ServicesDependencies");

            this.Generate();

            _assert.True(File.Exists(this.GetPath(@"Console\Console.Windows.csproj")));
            _assert.True(File.Exists(this.GetPath(@"Module.Windows.sln")));
            _assert.True(File.Exists(this.GetPath(@"Submodule\Library\Library.Windows.csproj")));
            _assert.True(File.Exists(this.GetPath(@"Submodule\Submodule.Windows.sln")));

            var moduleContents    = this.ReadFile(@"Module.Windows.sln");
            var submoduleContents = this.ReadFile(@"Submodule\Submodule.Windows.sln");

            _assert.Contains("Console.Windows.csproj", moduleContents);
            _assert.Contains("Library.Windows.csproj", moduleContents);
            _assert.Contains("Library.Windows.csproj", submoduleContents);
        }
Ejemplo n.º 3
0
        public void FactoryInterfaceIsGenerated()
        {
            var kernel = CreateKernel();

            var factory = kernel.Get <IGenericFactory <Player, DefaultWorld> >();

            _assert.NotNull(factory);
            _assert.True(factory.GetType().FullName.StartsWith("_GeneratedFactories"));
        }
        public void GenerationIsCorrect()
        {
            this.SetupTest("ServicesRecommends");

            this.Generate();

            _assert.True(File.Exists(this.GetPath(@"Console\Console.Windows.csproj")));
            _assert.True(File.Exists(this.GetPath(@"Submodule\Library\Library.Windows.csproj")));

            var libraryContents = this.ReadFile(@"Submodule\Library\Library.Windows.csproj");

            _assert.Contains("LIBRARY_SERVICE_B;", libraryContents);

            /*
             * ServiceB is only recommended, so if we explicitly disable it, it should
             * not be present.
             */

            this.Generate(args: "--disable Library/ServiceB");

            _assert.True(File.Exists(this.GetPath(@"Console\Console.Windows.csproj")));
            _assert.True(File.Exists(this.GetPath(@"Submodule\Library\Library.Windows.csproj")));

            libraryContents = this.ReadFile(@"Submodule\Library\Library.Windows.csproj");

            _assert.DoesNotContain("LIBRARY_SERVICE_B;", libraryContents);

            /*
             * ServiceA conflicts with ServiceB, so ServiceB automatically gets disabled.
             */

            this.Generate(args: "--enable Library/ServiceA");

            _assert.True(File.Exists(this.GetPath(@"Console\Console.Windows.csproj")));
            _assert.True(File.Exists(this.GetPath(@"Submodule\Library\Library.Windows.csproj")));

            libraryContents = this.ReadFile(@"Submodule\Library\Library.Windows.csproj");

            _assert.DoesNotContain("LIBRARY_SERVICE_B;", libraryContents);

            /*
             * ServiceC has no effect on ServiceB, so ServiceB should be enabled.
             */

            this.Generate(args: "--enable Library/ServiceC");

            _assert.True(File.Exists(this.GetPath(@"Console\Console.Windows.csproj")));
            _assert.True(File.Exists(this.GetPath(@"Submodule\Library\Library.Windows.csproj")));

            libraryContents = this.ReadFile(@"Submodule\Library\Library.Windows.csproj");

            _assert.Contains("LIBRARY_SERVICE_B;", libraryContents);
        }
        public void GenerationIsCorrect()
        {
            this.SetupTest("InfoPListFileIsGenerated");

            var infoPList = this.GetPath(@"Console\Info.plist");

            if (File.Exists(infoPList))
            {
                File.Delete(infoPList);
            }

            this.Generate("MacOS", hostPlatform: "MacOS");

            _assert.True(File.Exists(this.GetPath(@"Console\Console.MacOS.csproj")));
            _assert.True(File.Exists(infoPList));

            var consoleContents = this.ReadFile(@"Console\Console.MacOS.csproj");

            _assert.Contains("<None Include=\"Info.plist\"", consoleContents);
        }
        public void GenerationIsCorrect()
        {
            this.SetupTest("PlatformSpecificXSLTGenerationWorks");

            this.Generate("Windows");

            _assert.True(File.Exists(this.GetPath(@"Console\Console.Windows.csproj")));

            var consoleContents = this.ReadFile(@"Console\Console.Windows.csproj");

            _assert.Contains("ToolsVersion", consoleContents);

            this.Generate("MyCustomPlatform");

            _assert.True(File.Exists(this.GetPath(@"Console\Console.MyCustomPlatform.csproj")));

            consoleContents = this.ReadFile(@"Console\Console.MyCustomPlatform.csproj");

            _assert.Contains("MY_CUSTOM_XML", consoleContents);
        }
Ejemplo n.º 7
0
        public void GenerationIsCorrect()
        {
            this.SetupTest("TreatWarningsAsErrorsProperty");

            this.Generate("Windows");

            _assert.True(File.Exists(this.GetPath(@"Test\Test.Windows.csproj")));

            var projectContents = this.ReadFile(@"Test\Test.Windows.csproj");

            _assert.Contains(@"<TreatWarningsAsErrors>TREAT_WARNINGS_AS_ERRORS_TEST</TreatWarningsAsErrors>", projectContents);
        }
        public void GenerationIsCorrect()
        {
            this.SetupTest("PostBuildHookWorks");

            this.Generate("Windows");

            _assert.True(File.Exists(this.GetPath(@"Console\Console.Windows.csproj")));
            _assert.True(File.Exists(this.GetPath(@"Hook\Hook.Windows.csproj")));
            _assert.True(File.Exists(this.GetPath(@"Hook.Library\Hook.Library.Windows.csproj")));

            var consoleContents     = this.ReadFile(@"Console\Console.Windows.csproj");
            var hookContents        = this.ReadFile(@"Hook\Hook.Windows.csproj");
            var hookLibraryContents = this.ReadFile(@"Hook.Library\Hook.Library.Windows.csproj");

            _assert.Contains(@"Running &quot;Hook&quot; post-build hook...", consoleContents);
            _assert.Contains(@"Running &quot;Hook.External&quot; post-build hook...", consoleContents);
            _assert.DoesNotContain(@"Running &quot;Hook&quot; post-build hook...", hookContents);
            _assert.Contains(@"Running &quot;Hook.External&quot; post-build hook...", hookContents);
            _assert.DoesNotContain(@"Running &quot;Hook&quot; post-build hook...", hookLibraryContents);
            _assert.Contains(@"Running &quot;Hook.External&quot; post-build hook...", hookLibraryContents);
        }
Ejemplo n.º 9
0
        public void GenerationIsCorrect()
        {
            this.SetupTest("iOSSolutionHasCorrectProjectMappings");

            this.Generate("iOS");

            _assert.True(File.Exists(this.GetPath(@"Module.iOS.sln")));

            var solution = this.ReadFile(@"Module.iOS.sln");

            _assert.Contains(@".AppStore|iPhone.Build.0", solution);
        }
        public void GenerationIsCorrect()
        {
            this.SetupTest("WarningLevelProperty");

            this.Generate("Windows");

            _assert.True(File.Exists(this.GetPath(@"Test\Test.Windows.csproj")));

            var projectContents = this.ReadFile(@"Test\Test.Windows.csproj");

            _assert.Contains(@"<WarningLevel>WARNING_LEVEL_TEST</WarningLevel>", projectContents);
        }
Ejemplo n.º 11
0
        public void GenerationIsCorrect()
        {
            this.SetupTest("ServicesDefaultForRoot");

            this.Generate();

            _assert.True(File.Exists(this.GetPath(@"Console\Console.Windows.csproj")));

            var projectContents = this.ReadFile(@"Console\Console.Windows.csproj");

            _assert.Contains("CONSOLE_SERVICE;", projectContents);
        }
        public void GenerationIsCorrect()
        {
            this.SetupTest("CheckForOverflowUnderflowPropertyWorks");

            this.Generate("Windows");

            _assert.True(File.Exists(this.GetPath(@"Console\Console.Windows.csproj")));

            var consoleContents = this.ReadFile(@"Console\Console.Windows.csproj");

            _assert.Contains("<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>", consoleContents);
        }
Ejemplo n.º 13
0
        public static void PowerShellHelloWorld([NotNull] IAssert assert)
        {
            var pwsh   = new PowerShell();
            var result = (ShellCaptureResult)pwsh.ExecCommand("Write-Host 'Hello World'");

            assert.NotNull(result);
            assert.Equal(0, result.ExitCode);
            var firstLine = result.StdOut.FirstOrDefault();

            assert.NotEmpty(firstLine);
            assert.True(firstLine.Contains("Hello World"));
        }
Ejemplo n.º 14
0
        public void GenerationIsCorrect()
        {
            this.SetupTest("ContentProjectEmbeddedResourceWorks");

            this.Generate("Windows");

            _assert.True(File.Exists(this.GetPath(@"Console\\Console.Windows.csproj")));

            var projectContents = this.ReadFile(@"Console\\Console.Windows.csproj");

            _assert.Contains("EmbeddedResource", projectContents);
        }
Ejemplo n.º 15
0
        public void GeneratedTemplateIsCorrect()
        {
            this.SetupTest("PackageTemplateAppliesCorrectlyWithUnsafeName", true);

            // Make sure the Generated directory is removed so we have a clean test every time.
            if (Directory.Exists(this.GetPath("Generated")))
            {
                PathUtils.AggressiveDirectoryDelete(this.GetPath("Generated"));
            }

            Directory.CreateDirectory(GetPath("Generated"));

            var templateFolder = this.SetupSrcTemplate();

            try
            {
                this.OtherMode(
                    "start", "local-template-git://" + templateFolder + " Generated.WithDot",
                    workingSubdirectory: "Generated");

                _assert.True(Directory.Exists(GetPath(Path.Combine("Generated", "Generated.WithDot"))));
                _assert.True(Directory.Exists(GetPath(Path.Combine("Generated", "Generated.WithDot.Content"))));
                _assert.True(
                    File.Exists(GetPath(Path.Combine("Generated", "Generated.WithDot", "GeneratedWithDotActivity.cs"))));
                _assert.True(
                    File.Exists(GetPath(Path.Combine("Generated", "Generated.WithDot", "GeneratedWithDotGame.cs"))));
                _assert.True(
                    File.Exists(GetPath(Path.Combine("Generated", "Generated.WithDot", "GeneratedWithDotWorld.cs"))));

                var worldFile = ReadFile(Path.Combine("Generated", "Generated.WithDot", "GeneratedWithDotWorld.cs"));

                _assert.Contains("public class GeneratedWithDotWorld", worldFile);
                _assert.Contains("Hello Generated.WithDot!", worldFile);
            }
            finally
            {
                PathUtils.AggressiveDirectoryDelete(templateFolder);
            }
        }
Ejemplo n.º 16
0
        public void GenerationIsCorrect()
        {
            this.SetupTest("DuplicateExternalProjects");

            this.Generate("Windows");

            _assert.True(File.Exists(this.GetPath(@"DuplicateExternalProjects.Windows.sln")));

            var solutionContents = this.ReadFile(@"DuplicateExternalProjects.Windows.sln");

            _assert.Contains("ThirdParty1.csproj", solutionContents);
            _assert.DoesNotContain("ThirdParty2.csproj", solutionContents);
        }
        public void GenerationIsCorrect()
        {
            this.SetupTest("IncludeProjectPlatformSpecificWorks");

            this.Generate("Windows");

            _assert.True(File.Exists(this.GetPath(@"Module.Windows.sln")));
            _assert.True(File.Exists(this.GetPath(@"Console\Console.Windows.csproj")));

            var projectContents = this.ReadFile(@"Console\Console.Windows.csproj");

            _assert.Contains("<Link>Included Code\\Includable\\MyIncludableClass.cs</Link>", projectContents);

            this.Generate("Linux");

            _assert.True(File.Exists(this.GetPath(@"Module.Linux.sln")));
            _assert.True(File.Exists(this.GetPath(@"Console\Console.Linux.csproj")));

            projectContents = this.ReadFile(@"Console\Console.Linux.csproj");

            _assert.DoesNotContain("<Link>Included Code\\Includable\\MyIncludableClass.cs</Link>", projectContents);
        }
Ejemplo n.º 18
0
        public void GenerationIsCorrect()
        {
            this.SetupTest("IncludeProjectViaSubmoduleWorks");

            this.Generate("Windows");

            _assert.True(File.Exists(this.GetPath(@"Module.Windows.sln")));
            _assert.True(File.Exists(this.GetPath(@"Console\Console.Windows.csproj")));
            _assert.False(File.Exists(this.GetPath(@"Submodule\IncludableA\IncludableA.Windows.csproj")));
            _assert.False(File.Exists(this.GetPath(@"Submodule\IncludableB\IncludableB.Windows.csproj")));

            var projectContents = this.ReadFile(@"Console\Console.Windows.csproj");

            _assert.Contains("<Link>Included Code\\Submodule/IncludableA\\MyIncludableClass.cs</Link>", projectContents);
            _assert.Contains("<Link>Included Code\\Submodule/IncludableB\\MyIncludableClass.cs</Link>", projectContents);
            _assert.Contains("<FromIncludeProject>", projectContents);
            _assert.Contains("..\\Submodule\\IncludableA\\MyIncludableClass.cs", projectContents);
            _assert.Contains("..\\Submodule\\IncludableB\\MyIncludableClass.cs", projectContents);
            _assert.DoesNotContain("<Reference Include=\"IncludableA\" />", projectContents);
            _assert.DoesNotContain("<Reference Include=\"IncludableB\" />", projectContents);
            _assert.DoesNotContain("<Reference Include=\"External\" />", projectContents);
        }
        public void GenerationIsCorrect()
        {
            this.SetupTest("PlatformSpecificOutputFalse");

            this.Generate("Windows");

            _assert.True(File.Exists(this.GetPath(@"Test\Test.Windows.csproj")));

            var projectContents = this.ReadFile(@"Test\Test.Windows.csproj");

            _assert.DoesNotContain(@"bin\Windows\AnyCPU\Release", projectContents);
            _assert.Contains(@"bin\Release", projectContents);
        }
        public void GenerationIsCorrect()
        {
            this.SetupTest("ExternalCPlusPlusProjectReferencesAreCorrectInSolution");

            this.Generate("Windows", hostPlatform: "Windows");

            _assert.True(File.Exists(this.GetPath(@"Module.Windows.sln")));

            var solutionContents = this.ReadFile(@"Module.Windows.sln");

            _assert.Contains(
                "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"cppProjectName\", \"cppProjectName.vcxproj\", \"{1DBEF0FF-4EF7-4B4A-AF94-32A0CCB25547}\"",
                solutionContents);
        }
Ejemplo n.º 21
0
        /// <summary>
        /// Test that a small piece of data can be sent over the unreliable protocol.
        /// </summary>
        public void TestAcknowledgeEventData()
        {
            const string Text = @"hello";

            var udpClient1 = new UdpClient(0);
            var udpClient2 = new UdpClient(0);

            var dispatcher1 = new MxDispatcher(udpClient1);
            var dispatcher2 = new MxDispatcher(udpClient2);

            var port1 = ((IPEndPoint)udpClient1.Client.LocalEndPoint).Port;
            var port2 = ((IPEndPoint)udpClient2.Client.LocalEndPoint).Port;

            try
            {
                string receivedText = null;
                bool   acknowledged = false;

                dispatcher1.MessageReceived +=
                    (sender, args) =>
                {
                    receivedText = Encoding.ASCII.GetString(args.Payload);
                };

                dispatcher2.MessageAcknowledged += (sender, args) =>
                {
                    acknowledged = true;
                };

                var client      = dispatcher2.Connect(new IPEndPoint(IPAddress.Loopback, port1));
                var clientGroup = dispatcher2.PlaceInGroup(client, "Group2");

                this.SimulateNetworkCycles(4, dispatcher1, dispatcher2);

                dispatcher2.Send(clientGroup, Encoding.ASCII.GetBytes(Text));

                _assert.Null(receivedText);

                this.SimulateNetworkCycles(8, dispatcher1, dispatcher2);

                _assert.Equal(Text, receivedText);
                _assert.True(acknowledged);
            }
            finally
            {
                dispatcher1.Close();
                dispatcher2.Close();
            }
        }
        public void GenerationIsCorrect()
        {
            this.SetupTest("PackageLocationParentAndSubmoduleSamePackage");

            var src = this.SetupSrcPackage();

            try
            {
                // Make sure the Package directory is removed so we have a clean test every time.
                if (Directory.Exists(this.GetPath("Package")))
                {
                    PathUtils.AggressiveDirectoryDelete(this.GetPath("Package"));
                }

                this.Generate(args: "--redirect http://protobuild.org/hach-que/TestEmptyPackage local-git://" + src);

                _assert.True(File.Exists(this.GetPath("Package\\PackageLibrary\\PackageLibrary.Windows.csproj")));
                _assert.True(File.Exists(this.GetPath("Submodule\\Package\\.redirect")));
                _assert.True(File.Exists(this.GetPath("Submodule\\Library\\Library.Windows.csproj")));
                _assert.True(File.Exists(this.GetPath("Console\\Console.Windows.csproj")));

                var consoleContents = this.ReadFile("Console\\Console.Windows.csproj");
                var libraryContents = this.ReadFile("Submodule\\Library\\Library.Windows.csproj");

                _assert.Contains(
                    @"Include=""..\Package\PackageLibrary\PackageLibrary.Windows.csproj""",
                    consoleContents);
                _assert.Contains(
                    @"Include=""..\..\Package\PackageLibrary\PackageLibrary.Windows.csproj""",
                    libraryContents);
            }
            finally
            {
                PathUtils.AggressiveDirectoryDelete(src);
            }
        }
        public void GenerationIsCorrect()
        {
            this.SetupTest("iOSLegacyAPIGenerationWorks");

            this.Generate("iOS");

            _assert.True(File.Exists(this.GetPath(@"App\App.iOS.csproj")));

            var appContents = this.ReadFile(@"App\App.iOS.csproj");

            _assert.DoesNotContain(@"Xamarin.iOS", appContents);
            _assert.DoesNotContain(@"$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets", appContents);
            _assert.Contains(@"monotouch", appContents);
            _assert.Contains(@"$(MSBuildToolsPath)\Microsoft.CSharp.targets", appContents);
        }
Ejemplo n.º 24
0
        public void GenerationIsCorrect()
        {
            this.SetupTest("SimulateHostPlatformWorks");

            var platform     = Path.DirectorySeparatorChar == '/' ? "Linux" : "Windows";
            var hostPlatform = Path.DirectorySeparatorChar == '/' ? "Windows" : "Linux";
            var platformPath = this.GetPath(Path.Combine("Console", "Console." + platform + ".csproj"));

            this.Generate(platform: platform, hostPlatform: hostPlatform);

            _assert.True(File.Exists(platformPath));

            var contents = ReadFile(platformPath);

            _assert.Contains("HostPlatform:" + hostPlatform, contents);
        }
Ejemplo n.º 25
0
        public void GenerationIsCorrect()
        {
            this.SetupTest("ServicesDisable");

            this.Generate();

            _assert.True(File.Exists(this.GetPath(@"Console\Console.Windows.csproj")));
            _assert.True(File.Exists(this.GetPath(@"Submodule\Library\Library.Windows.csproj")));
            _assert.True(File.Exists(this.GetPath(@"Submodule\Library\LibraryExcludable.Windows.csproj")));

            var consoleContents           = this.ReadFile(@"Console\Console.Windows.csproj");
            var libraryContents           = this.ReadFile(@"Submodule\Library\Library.Windows.csproj");
            var libraryExcludableContents = this.ReadFile(@"Submodule\Library\LibraryExcludable.Windows.csproj");

            _assert.Contains("CONSOLE_SERVICE_A;", consoleContents);
            _assert.Contains("LIBRARY_SERVICE_B;", libraryContents);
            _assert.Contains("LIBRARY_SERVICE_C;", libraryContents);
            _assert.Contains("LIBRARY_SERVICE_D;", libraryExcludableContents);

            this.Generate(args: "--disable Console/ServiceA");

            _assert.True(File.Exists(this.GetPath(@"Console\Console.Windows.csproj")));
            _assert.True(File.Exists(this.GetPath(@"Submodule\Library\Library.Windows.csproj")));
            _assert.False(File.Exists(this.GetPath(@"Submodule\Library\LibraryExcludable.Windows.csproj")));

            consoleContents = this.ReadFile(@"Console\Console.Windows.csproj");
            libraryContents = this.ReadFile(@"Submodule\Library\Library.Windows.csproj");

            _assert.DoesNotContain("CONSOLE_SERVICE_A;", consoleContents);
            _assert.DoesNotContain("LIBRARY_SERVICE_B;", libraryContents);
            _assert.Contains("LIBRARY_SERVICE_C;", libraryContents);

            this.Generate(args: "--disable Library/ServiceB");

            _assert.True(File.Exists(this.GetPath(@"Console\Console.Windows.csproj")));
            _assert.True(File.Exists(this.GetPath(@"Submodule\Library\Library.Windows.csproj")));
            _assert.False(File.Exists(this.GetPath(@"Submodule\Library\LibraryExcludable.Windows.csproj")));

            consoleContents = this.ReadFile(@"Console\Console.Windows.csproj");
            libraryContents = this.ReadFile(@"Submodule\Library\Library.Windows.csproj");

            _assert.DoesNotContain("CONSOLE_SERVICE_A;", consoleContents);
            _assert.DoesNotContain("LIBRARY_SERVICE_B;", libraryContents);
            _assert.Contains("LIBRARY_SERVICE_C;", libraryContents);

            // Protobuild now returns with exit code 1 if you try to disable
            // a service that is required.
            this.Generate(args: "--disable Library/ServiceC", expectFailure: true);
        }
        public void GenerationIsCorrect()
        {
            this.SetupTest("MacOSPlatformForceAPIXamarinMacWorks");

            var @out = this.Generate("MacOS", capture: true);

            var appPath = this.GetPath("App\\App.MacOS.csproj");

            _assert.True(File.Exists(appPath));

            var appContents = this.ReadFile(appPath);

            _assert.Contains("<Reference Include=\"Xamarin.Mac\"", appContents);
            _assert.Contains("{A3F8F2AB-B479-4A4A-A458-A89E7DC349F1}", appContents);
            _assert.Contains("Xamarin.Mac.CSharp.targets", appContents);
            _assert.DoesNotContain("PLATFORM_MACOS_LEGACY", appContents);
        }
        public void GenerationIsCorrect()
        {
            this.SetupTest("MacOSPlatformForceAPIMonoMacWorks");

            var @out = this.Generate("MacOS", capture: true);

            var appPath = this.GetPath("App\\App.MacOS.csproj");

            _assert.True(File.Exists(appPath));

            var appContents = this.ReadFile(appPath);

            _assert.Contains("<Reference Include=\"MonoMac\"", appContents);
            _assert.Contains("{948B3504-5B70-4649-8FE4-BDE1FB46EC69}", appContents);
            _assert.DoesNotContain("Xamarin.Mac.CSharp.targets", appContents);
            _assert.Contains("PLATFORM_MACOS_LEGACY", appContents);
        }
        public void GenerationIsCorrect()
        {
            this.SetupTest("MacOSPlatformForceAPIXamMacWorks");

            var @out = this.Generate("MacOS", capture: true);

            var appPath = this.GetPath("App\\App.MacOS.csproj");

            _assert.True(File.Exists(appPath));

            var appContents = this.ReadFile(appPath);

            _assert.Contains("<Reference Include=\"XamMac\"", appContents);
            _assert.Contains("{42C0BBD9-55CE-4FC1-8D90-A7348ABAFB23}", appContents);
            _assert.DoesNotContain("Xamarin.Mac.CSharp.targets", appContents);
            _assert.Contains("PLATFORM_MACOS_LEGACY", appContents);
        }
        public void GenerationIsCorrect()
        {
            this.SetupTest("ExternalProjectReferencesAreFlattened");

            this.Generate("Windows");

            _assert.True(File.Exists(this.GetPath(@"Console\Console.Windows.csproj")));

            var consoleContents = this.ReadFile(@"Console\Console.Windows.csproj");

            _assert.DoesNotContain("ExternalA", consoleContents);
            _assert.DoesNotContain("ExternalB", consoleContents);
            _assert.DoesNotContain("ExternalC", consoleContents);
            _assert.DoesNotContain("ExternalD", consoleContents);
            _assert.DoesNotContain("ExternalE", consoleContents);
            _assert.Contains("ExpectedTargetMet", consoleContents);
            _assert.Contains("ExpectedPlatformTargetMet", consoleContents);
        }
        public void GenerationIsCorrect()
        {
            this.SetupTest("ConfigurationMappingWorks");

            this.Generate("Windows");

            _assert.True(File.Exists(this.GetPath(@"Module.Windows.sln")));

            var solutionContents = this.ReadFile(@"Module.Windows.sln");

            _assert.DoesNotContain("{73E1432F-7BB5-4E5A-B952-F9CBCEA7FG76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU", solutionContents);
            _assert.DoesNotContain("{73E1432F-7BB5-4E5A-B952-F9CBCEA7FG76}.Debug|Any CPU.Build.0 = Debug|Any CPU", solutionContents);
            _assert.DoesNotContain("{73E1432F-7BB5-4E5A-B952-F9CBCEA7FG76}.Release|Any CPU.ActiveCfg = Release|Any CPU", solutionContents);
            _assert.DoesNotContain("{73E1432F-7BB5-4E5A-B952-F9CBCEA7FG76}.Release|Any CPU.Build.0 = Release|Any CPU", solutionContents);
            _assert.Contains("{73E1432F-7BB5-4E5A-B952-F9CBCEA7FG76}.Debug|Any CPU.ActiveCfg = Debug|SomeConf", solutionContents);
            _assert.Contains("{73E1432F-7BB5-4E5A-B952-F9CBCEA7FG76}.Debug|Any CPU.Build.0 = Debug|SomeConf", solutionContents);
            _assert.Contains("{73E1432F-7BB5-4E5A-B952-F9CBCEA7FG76}.Release|Any CPU.ActiveCfg = Release|SomeConf", solutionContents);
            _assert.Contains("{73E1432F-7BB5-4E5A-B952-F9CBCEA7FG76}.Release|Any CPU.Build.0 = Release|SomeConf", solutionContents);
        }