Ejemplo n.º 1
0
        public PackageJson ParsePackageJson(Stream content)
        {
            content.AssertNotNull(nameof(content));

            var parser = new PackageJsonParser(content.JsonDeserialize <JObject>());

            return(new PackageJson
            {
                Name = parser.GetName(),
                Version = parser.GetVersion(),
                HomePage = parser.GetHomePage(),
                Authors = parser.GetAuthors(),
                Description = parser.GetDescription(),
                License = parser.GetLicense(),
                Repository = parser.GetRepository(),
                PackageHRef = new Uri(new Uri("https://" + KnownHosts.Npm), "package/{0}/v/{1}".FormatWith(parser.GetName(), parser.GetVersion())).ToString()
            });
        }
Ejemplo n.º 2
0
 public void GetName()
 {
     _sut.GetName().ShouldBe("@types/angular");
 }