Example #1
0
        public void It_does_not_download_desktop_runtime_packs_on_unix()
        {
            const string Rid = "win-x64";

            var testProjectCreator = new TestProjectCreator()
            {
                MinorVersion = "3.1"
            };

            testProjectCreator.AdditionalProperties["RestorePackagesPath"] = @"$(MSBuildProjectDirectory)\packages";
            testProjectCreator.AdditionalProperties["OutputType"]          = "exe";
            testProjectCreator.AdditionalProperties["RuntimeIdentifier"]   = Rid;
Example #2
0
        public void It_does_not_download_desktop_targeting_packs_on_unix()
        {
            var testProjectCreator = new TestProjectCreator()
            {
                MinorVersion = "5.0"
            };

            testProjectCreator.AdditionalProperties["RestorePackagesPath"] = @"$(MSBuildProjectDirectory)\packages";
            testProjectCreator.AdditionalProperties["OutputType"]          = "exe";

            var testInstance = testProjectCreator.Create();

            new BuildCommand()
            .WithWorkingDirectory(testInstance.Root.FullName)
            .Execute()
            .Should().Pass();

            string packagesPath = Path.Combine(testInstance.Root.FullName, "packages");

            Directory.Exists(packagesPath).Should().BeFalse(packagesPath + " should not exist");
        }
        static int Main(string[] args)
        {
            try
            {
                string folder = GetSetting(args, "folder");
                if (string.IsNullOrWhiteSpace(folder))
                {
                    return(ShowHelp("Missing Parameter: You must select a folder with /folder"));
                }

                string specificationProject = GetSetting(args, "project");
                if (string.IsNullOrWhiteSpace(specificationProject))
                {
                    return(ShowHelp("Missing Parameter: You must select a specification project with /project"));
                }

                string rootNamespace = GetSetting(args, "namespace");
                if (string.IsNullOrWhiteSpace(rootNamespace))
                {
                    return(ShowHelp("Missing Parameter: You must specify a root namespace with /namespace"));
                }

                string assertionClassPrefix = GetSetting(args, "assertionClassPrefix");

                var usings = GetSetting(args, "usings").Split(' ').ToList();

                TestProjectCreator.Create(folder, specificationProject, rootNamespace, usings, assertionClassPrefix, new ExcelTabularLibrary());

                return(0);
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine("Error encountered creating code for tests:");
                Console.Error.WriteLine(ex.Message);
                return(-1);
            }
        }
Example #4
0
        public void It_does_not_download_desktop_runtime_packs_on_unix()
        {
            const string Rid = "win-x64";

            var testProjectCreator = new TestProjectCreator()
            {
                MinorVersion = "3.1"
            };

            testProjectCreator.AdditionalProperties["RestorePackagesPath"] = @"$(MSBuildProjectDirectory)\packages";
            testProjectCreator.AdditionalProperties["OutputType"]          = "exe";
            testProjectCreator.AdditionalProperties["RuntimeIdentifier"]   = Rid;

            var testInstance = testProjectCreator.Create();

            new PublishCommand()
            .WithWorkingDirectory(testInstance.Root.FullName)
            .Execute()
            .Should().Pass();

            string packagesPath = Path.Combine(testInstance.Root.FullName, "packages", $"runtime.{Rid}.microsoft.windowsdesktop.app");

            Directory.Exists(packagesPath).Should().BeFalse(packagesPath + " should not exist");
        }