예제 #1
0
        public void print_sample_manifest()
        {
            var manifest = new PackageManifest
            {
                Id            = "linqpad",
                Version       = "4.51.03",
                Home          = "http://www.linqpad.net/",
                InstallMethod = InstallMethodTypes.Zip,
                Installers    = new List <Installer>
                {
                    new Installer
                    {
                        Location     = "http://www.linqpad.net/GetFile.aspx?LINQPad4-AnyCPU.zip",
                        Architecture = ArchitectureTypes.x86
                    },
                    new Installer
                    {
                        Location          = "http://www.linqpad.net/GetFile.aspx?LINQPad4-AnyCPU.zip",
                        Architecture      = ArchitectureTypes.x86,
                        MinWindowsVersion = WindowsVersion.KnownVersions.First(),
                    }
                }
            };


            Console.WriteLine(manifest.ToYaml());
        }
예제 #2
0
 public void PrintManifest(PackageManifest manifest)
 {
     Console.WriteLine("===============================================");
     Console.WriteLine();
     Console.WriteLine(manifest.ToYaml());
     Console.WriteLine();
     Console.WriteLine("===============================================");
 }
예제 #3
0
        public void should_not_serialize_is_latest()
        {
            var manifest = new PackageManifest();

            var yaml = manifest.ToYaml();

            yaml.Should().NotContain("isLatest");
        }
예제 #4
0
        public void should_not_serialize_tag()
        {
            var manifest = new PackageManifest
            {
                Tag = "1.0"
            };

            var yaml = manifest.ToYaml();

            yaml.Should().NotContain("1.0");
        }
예제 #5
0
        public void should_not_serialize_empty_args()
        {
            var manifest = new PackageManifest
            {
                Args = new InstallArgs(),
                Id   = "test_manifest"
            };

            var yaml = manifest.ToYaml();

            yaml.Should().NotContain("args");
        }
예제 #6
0
        public void should_serialize_none_empty_empty_args()
        {
            var manifest = new PackageManifest
            {
                Args = new InstallArgs {
                    Silent = "/S"
                },
                Id = "test_manifest"
            };

            var yaml = manifest.ToYaml();

            yaml.Should().Contain("args");
            yaml.Should().Contain("/S");
        }