Example #1
0
 /// <summary>
 /// Creates a fictive test <see cref="Implementation"/>.
 /// </summary>
 public static Implementation CreateTestImplementation() => new Implementation
 {
     ID             = "id1",
     ManifestDigest = new ManifestDigest(sha256: "123"),
     Version        = new ImplementationVersion("1.0"),
     Architecture   = new Architecture(OS.Windows, Cpu.I586),
     Languages      = { "en-US" },
     Commands       = { CommandTest.CreateTestCommand1() },
     DocDir         = "doc",
     Stability      = Stability.Developer,
     Dependencies   =
     {
         new Dependency
         {
             InterfaceUri = Test1Uri,
             Constraints  = { new Constraint {
                                  NotBefore = new ImplementationVersion("1.0"), Before = new ImplementationVersion("2.0")
                              } },
             Bindings ={ EnvironmentBindingTest.CreateTestBinding(), OverlayBindingTest.CreateTestBinding(), ExecutableInVarTest.CreateTestBinding(), ExecutableInPathTest.CreateTestBinding() }
         }
     },
     Restrictions =
     {
         new Restriction
         {
             InterfaceUri = Test2Uri,
             Constraints  = { new Constraint {
                                  Before = new ImplementationVersion("2.0")
                              } }
         }
     },
     RetrievalMethods =
     {
         new Recipe
         {
             Steps =
             {
                 new Archive    {
                     Href = new Uri("http://example.com/test.zip"), Size = 1024
                 },
                 new SingleFile {
                     Href = new Uri("http://example.com/test.dat"), Size = 1024, Destination = "test.dat"
                 },
                 new RenameStep {
                     Source = "a", Destination = "b"
                 },
                 new RemoveStep {
                     Path = "c"
                 }
             }
         }
     }
 };
Example #2
0
 /// <summary>
 /// Creates a fictive test <see cref="Implementation"/>.
 /// </summary>
 public static Implementation CreateTestImplementation() => new Implementation
 {
     ID               = "id",
     ManifestDigest   = new ManifestDigest(sha256: "123"),
     Version          = new ImplementationVersion("1.0"),
     Architecture     = new Architecture(OS.Windows, Cpu.I586),
     Languages        = { "en-US" },
     Main             = "executable",
     DocDir           = "doc",
     Stability        = Stability.Developer,
     Bindings         = { EnvironmentBindingTest.CreateTestBinding() },
     RetrievalMethods = { ArchiveTest.CreateTestArchive(), new Recipe {
                              Steps = { ArchiveTest.CreateTestArchive() }
                          } },
     Commands = { CommandTest.CreateTestCommand1() }
 };
Example #3
0
 /// <summary>
 /// Creates a fictive test <see cref="PackageImplementation"/>.
 /// </summary>
 public static PackageImplementation CreateTestPackageImplementation() => new PackageImplementation
 {
     Package       = "firefox",
     Distributions = { "RPM" },
     Version       = new ImplementationVersion("1.0"),
     Architecture  = new Architecture(OS.Windows, Cpu.I586),
     Languages     = { "en-US" },
     Commands      = { CommandTest.CreateTestCommand1() },
     DocDir        = "doc",
     Dependencies  =
     {
         new Dependency
         {
             InterfaceUri = Test2Uri,
             Importance   = Importance.Recommended,
             Bindings     = { EnvironmentBindingTest.CreateTestBinding(), OverlayBindingTest.CreateTestBinding(), ExecutableInVarTest.CreateTestBinding(), ExecutableInPathTest.CreateTestBinding() }
         }
     }
 };