Ejemplo n.º 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());
        }
Ejemplo n.º 2
0
 public void PrintManifest(PackageManifest manifest)
 {
     Console.WriteLine("===============================================");
     Console.WriteLine();
     Console.WriteLine(manifest.ToYaml());
     Console.WriteLine();
     Console.WriteLine("===============================================");
 }
Ejemplo n.º 3
0
        public void should_not_serialize_is_latest()
        {
            var manifest = new PackageManifest();

            var yaml = manifest.ToYaml();

            yaml.Should().NotContain("isLatest");
        }
Ejemplo n.º 4
0
        public void should_not_serialize_tag()
        {
            var manifest = new PackageManifest
            {
                Tag = "1.0"
            };

            var yaml = manifest.ToYaml();

            yaml.Should().NotContain("1.0");
        }
Ejemplo n.º 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");
        }
Ejemplo n.º 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");
        }