コード例 #1
0
            public FactsBase()
            {
                _mockServer = new MockServerHttpClientHandler();

                // Mock a catalog entry and leaf for the package we are validating.
                _catalogEntries = new[]
                {
                    new CatalogIndexEntry(
                        new Uri("https://nuget.test/catalog/leaf.json"),
                        CatalogConstants.NuGetPackageDetails,
                        Guid.NewGuid().ToString(),
                        DateTime.UtcNow,
                        PackageIdentity)
                };

                ValidatorTestUtility.AddCatalogLeafToMockServer(_mockServer, new Uri("/catalog/leaf.json", UriKind.Relative), new CatalogLeaf
                {
                    Created    = PackageCreationTime,
                    LastEdited = PackageCreationTime
                });
            }
コード例 #2
0
 protected void AddCatalogLeaf(string path, CatalogLeaf leaf)
 {
     ValidatorTestUtility.AddCatalogLeafToMockServer(_mockServer, new Uri(path, UriKind.Relative), leaf);
 }