# frozen_string_literal: true

require "spec_helper"

describe Bibliothecary::Parsers::Nuget do
  it "has a platform name" do
    expect(described_class.platform_name).to eq("nuget")
  end

  it "parses dependencies from Project.json" do
    expect(described_class.analyse_contents("Project.json", load_fixture("Project.json"))).to eq({
                                                                                                   platform: "nuget",
                                                                                                   path: "Project.json",
                                                                                                   project_name: nil,
                                                                                                   dependencies: [
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Server.Kestrel", requirement: "1.0.0-beta7", type: "runtime", source: "Project.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Server.IIS", requirement: "1.0.0-beta7", type: "runtime", source: "Project.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Mvc", requirement: "6.0.0-beta7", type: "runtime", source: "Project.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Server.WebListener", requirement: "1.0.0-beta7", type: "runtime", source: "Project.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.StaticFiles", requirement: "1.0.0-beta7", type: "runtime", source: "Project.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "EntityFramework.InMemory", requirement: "7.0.0-beta7", type: "runtime", source: "Project.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "EntityFramework.SqlServer", requirement: "7.0.0-beta7", type: "runtime", source: "Project.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Authentication.Cookies", requirement: "1.0.0-beta7", type: "runtime", source: "Project.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Identity.EntityFramework", requirement: "3.0.0-beta7", type: "runtime", source: "Project.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Framework.Configuration", requirement: "1.0.0-beta7", type: "runtime", source: "Project.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Framework.Configuration.EnvironmentVariables", requirement: "1.0.0-beta7", type: "runtime", source: "Project.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Framework.Configuration.Json", requirement: "1.0.0-beta7", type: "runtime", source: "Project.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "AutoMapper", requirement: "4.0.0-alpha1", type: "runtime", source: "Project.json"),
      ],
                                                                                                   kind: "manifest",
                                                                                                   success: true,
                                                                                                 })
  end

  it "parses dependencies from Project.lock.json" do
    expect(described_class.analyse_contents("Project.lock.json", load_fixture("Project.lock.json"))).to eq({
                                                                                                             platform: "nuget",
                                                                                                             path: "Project.lock.json",
                                                                                                             dependencies: [
        Bibliothecary::Dependency.new(platform: "nuget", name: "AutoMapper", requirement: "4.0.0-alpha1", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "EntityFramework.Core", requirement: "7.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "EntityFramework.InMemory", requirement: "7.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "EntityFramework.Relational", requirement: "7.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "EntityFramework.SqlServer", requirement: "7.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Ix-Async", requirement: "1.2.5", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Antiforgery", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Authentication", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Authentication.Cookies", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Authorization", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Cors.Core", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Cryptography.Internal", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Cryptography.KeyDerivation", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.DataProtection", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.DataProtection.Abstractions", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Diagnostics.Abstractions", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.FileProviders.Abstractions", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.FileProviders.Physical", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Hosting", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Hosting.Abstractions", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Hosting.Server.Abstractions", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Html.Abstractions", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Http", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Http.Abstractions", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Http.Extensions", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Http.Features", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Identity", requirement: "3.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Identity.EntityFramework", requirement: "3.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.JsonPatch", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Loader.IIS", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Loader.IIS.Interop", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Localization", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Mvc", requirement: "6.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Mvc.Abstractions", requirement: "6.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Mvc.ApiExplorer", requirement: "6.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Mvc.Core", requirement: "6.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Mvc.Cors", requirement: "6.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Mvc.DataAnnotations", requirement: "6.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Mvc.Formatters.Json", requirement: "6.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Mvc.Localization", requirement: "6.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Mvc.Razor", requirement: "6.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Mvc.Razor.Host", requirement: "6.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Mvc.ViewFeatures", requirement: "6.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.PageExecutionInstrumentation.Interfaces", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Razor", requirement: "4.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Razor.Runtime", requirement: "4.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Routing", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Server.IIS", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Server.Kestrel", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.Server.WebListener", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.StaticFiles", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.WebUtilities", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.CodeAnalysis.Analyzers", requirement: "1.1.0-beta1-20150812-01", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.CodeAnalysis.Common", requirement: "1.1.0-beta1-20150812-01", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.CodeAnalysis.CSharp", requirement: "1.1.0-beta1-20150812-01", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.CSharp", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Dnx.Compilation.Abstractions", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Dnx.Compilation.CSharp.Abstractions", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Dnx.Compilation.CSharp.Common", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Dnx.Runtime.Abstractions", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Framework.Caching.Abstractions", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Framework.Caching.Memory", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Framework.Configuration", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Framework.Configuration.Abstractions", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Framework.Configuration.Binder", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Framework.Configuration.CommandLine", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Framework.Configuration.EnvironmentVariables", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Framework.Configuration.Ini", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Framework.Configuration.Json", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Framework.DependencyInjection", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Framework.DependencyInjection.Abstractions", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Framework.Globalization.CultureInfoCache", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Framework.Localization", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Framework.Localization.Abstractions", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Framework.Logging", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Framework.Logging.Abstractions", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Framework.Notification", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Framework.OptionsModel", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Framework.WebEncoders", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Framework.WebEncoders.Core", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Net.Http.Headers", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Net.Http.Server", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Net.WebSockets", requirement: "1.0.0-beta7", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Win32.Primitives", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Win32.Registry", requirement: "4.0.0-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Newtonsoft.Json", requirement: "6.0.6", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Remotion.Linq", requirement: "2.0.0-beta-002", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Collections", requirement: "4.0.11-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Collections.Concurrent", requirement: "4.0.11-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Collections.Immutable", requirement: "1.1.36", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Collections.NonGeneric", requirement: "4.0.0.0", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Collections.Specialized", requirement: "4.0.0-beta-22816", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.ComponentModel", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.ComponentModel.Annotations", requirement: "4.0.11-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.ComponentModel.EventBasedAsync", requirement: "4.0.10", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.ComponentModel.Primitives", requirement: "4.0.0", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.ComponentModel.TypeConverter", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Console", requirement: "4.0.0-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Data.Common", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Data.SqlClient", requirement: "4.0.0-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Diagnostics.Contracts", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Diagnostics.Debug", requirement: "4.0.11-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Diagnostics.Process", requirement: "4.0.0-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Diagnostics.Tools", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Diagnostics.TraceSource", requirement: "4.0.0-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Diagnostics.Tracing", requirement: "4.0.21-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Dynamic.Runtime", requirement: "4.0.11-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Globalization", requirement: "4.0.11-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Globalization.Calendars", requirement: "4.0.0", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Globalization.Extensions", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.IO", requirement: "4.0.11-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.IO.FileSystem", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.IO.FileSystem.Primitives", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.IO.FileSystem.Watcher", requirement: "4.0.0-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Linq", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Linq.Expressions", requirement: "4.0.11-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Linq.Queryable", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Net.NetworkInformation", requirement: "4.0.10-beta-23123", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Net.Primitives", requirement: "4.0.11-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Net.Security", requirement: "4.0.0-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Net.Sockets", requirement: "4.1.0-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Net.WebSockets", requirement: "4.0.0-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.ObjectModel", requirement: "4.0.11-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Private.Networking", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Private.Uri", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Reflection", requirement: "4.1.0-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Reflection.Emit", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Reflection.Emit.ILGeneration", requirement: "4.0.0", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Reflection.Emit.Lightweight", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Reflection.Extensions", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Reflection.Metadata", requirement: "1.1.0-alpha-00009", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Reflection.Primitives", requirement: "4.0.0", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Reflection.TypeExtensions", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Resources.ReaderWriter", requirement: "4.0.0-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Resources.ResourceManager", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Runtime", requirement: "4.0.21-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Runtime.Extensions", requirement: "4.0.11-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Runtime.Handles", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Runtime.InteropServices", requirement: "4.0.21-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Runtime.Numerics", requirement: "4.0.0", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Security.Claims", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Security.Cryptography.Algorithms", requirement: "4.0.0-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Security.Cryptography.Csp", requirement: "4.0.0-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Security.Cryptography.Encoding", requirement: "4.0.0-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Security.Cryptography.Primitives", requirement: "4.0.0-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Security.Cryptography.X509Certificates", requirement: "4.0.0-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Security.Principal", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Security.Principal.Windows", requirement: "4.0.0-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Security.SecureString", requirement: "4.0.0-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Text.Encoding", requirement: "4.0.11-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Text.Encoding.CodePages", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Text.Encoding.Extensions", requirement: "4.0.11-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Text.RegularExpressions", requirement: "4.0.11-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Threading", requirement: "4.0.11-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Threading.Overlapped", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Threading.Tasks", requirement: "4.0.11-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Threading.Tasks.Parallel", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Threading.Thread", requirement: "4.0.0-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Threading.ThreadPool", requirement: "4.0.10-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Threading.Timer", requirement: "4.0.1-beta-23225", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Xml.ReaderWriter", requirement: "4.0.10", type: "runtime", source: "Project.lock.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Xml.XDocument", requirement: "4.0.11-beta-23225", type: "runtime", source: "Project.lock.json"),
      ],
                                                                                                             kind: "lockfile",
                                                                                                             project_name: nil,
                                                                                                             success: true,
                                                                                                           })
  end

  it "parses dependencies from packages.lock.json" do
    expect(described_class.analyse_contents("packages.lock.json", load_fixture("packages.lock.json"))).to eq(
      {
        platform: "nuget",
        path: "packages.lock.json",
        dependencies: [ # rubocop:disable Metrics/CollectionLiteralLength
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.App", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Razor.Design", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.NETCore.App", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNet.WebApi.Client", requirement: "5.2.6", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Antiforgery", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Authentication", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Authentication.Abstractions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Authentication.Cookies", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Authentication.Core", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Authentication.Facebook", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Authentication.Google", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Authentication.JwtBearer", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Authentication.MicrosoftAccount", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Authentication.OAuth", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Authentication.OpenIdConnect", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Authentication.Twitter", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Authentication.WsFederation", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Authorization", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Authorization.Policy", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Connections.Abstractions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.CookiePolicy", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Cors", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Cryptography.Internal", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Cryptography.KeyDerivation", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.DataProtection", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.DataProtection.Abstractions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.DataProtection.Extensions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Diagnostics", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Diagnostics.Abstractions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Diagnostics.HealthChecks", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.HostFiltering", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Hosting", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Hosting.Abstractions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Hosting.Server.Abstractions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Html.Abstractions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Http", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Http.Abstractions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Http.Connections", requirement: "1.1.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Http.Connections.Common", requirement: "1.1.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Http.Extensions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Http.Features", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.HttpOverrides", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.HttpsPolicy", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Identity", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Identity.EntityFrameworkCore", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Identity.UI", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.JsonPatch", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Localization", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Localization.Routing", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.MiddlewareAnalysis", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Mvc", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Mvc.Abstractions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Mvc.Analyzers", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Mvc.ApiExplorer", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Mvc.Core", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Mvc.Cors", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Mvc.DataAnnotations", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Mvc.Formatters.Json", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Mvc.Formatters.Xml", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Mvc.Localization", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Mvc.Razor", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Mvc.Razor.Extensions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Mvc.RazorPages", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Mvc.TagHelpers", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Mvc.ViewFeatures", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.NodeServices", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Owin", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Razor", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Razor.Language", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Razor.Runtime", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.ResponseCaching", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.ResponseCaching.Abstractions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.ResponseCompression", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Rewrite", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Routing", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Routing.Abstractions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Server.HttpSys", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Server.IIS", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Server.IISIntegration", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Server.Kestrel", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Server.Kestrel.Core", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Server.Kestrel.Https", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Session", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.SignalR", requirement: "1.1.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.SignalR.Common", requirement: "1.1.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.SignalR.Core", requirement: "1.1.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.SignalR.Protocols.Json", requirement: "1.1.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.SpaServices", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.SpaServices.Extensions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.StaticFiles", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.WebSockets", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.WebUtilities", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.CodeAnalysis.Analyzers", requirement: "1.1.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.CodeAnalysis.Common", requirement: "2.8.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.CodeAnalysis.CSharp", requirement: "2.8.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.CodeAnalysis.Razor", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.CSharp", requirement: "4.5.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.DotNet.PlatformAbstractions", requirement: "2.1.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.EntityFrameworkCore", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.EntityFrameworkCore.Abstractions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.EntityFrameworkCore.Analyzers", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.EntityFrameworkCore.Design", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.EntityFrameworkCore.InMemory", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.EntityFrameworkCore.Relational", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.EntityFrameworkCore.SqlServer", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.EntityFrameworkCore.Tools", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Caching.Abstractions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Caching.Memory", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Caching.SqlServer", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Configuration", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Configuration.Abstractions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Configuration.Binder", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Configuration.CommandLine", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Configuration.EnvironmentVariables", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Configuration.FileExtensions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Configuration.Ini", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Configuration.Json", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Configuration.KeyPerFile", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Configuration.UserSecrets", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Configuration.Xml", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.DependencyInjection", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.DependencyInjection.Abstractions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.DependencyModel", requirement: "2.1.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.DiagnosticAdapter", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Diagnostics.HealthChecks", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.FileProviders.Abstractions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.FileProviders.Composite", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.FileProviders.Embedded", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.FileProviders.Physical", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.FileSystemGlobbing", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Hosting", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Hosting.Abstractions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Http", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Identity.Core", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Identity.Stores", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Localization", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Localization.Abstractions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Logging", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Logging.Abstractions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Logging.Configuration", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Logging.Console", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Logging.Debug", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Logging.EventSource", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Logging.TraceSource", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.ObjectPool", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Options", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Options.ConfigurationExtensions", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Options.DataAnnotations", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Primitives", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.WebEncoders", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.IdentityModel.JsonWebTokens", requirement: "5.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.IdentityModel.Logging", requirement: "5.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.IdentityModel.Protocols", requirement: "5.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.IdentityModel.Protocols.OpenIdConnect", requirement: "5.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.IdentityModel.Protocols.WsFederation", requirement: "5.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.IdentityModel.Tokens", requirement: "5.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.IdentityModel.Tokens.Saml", requirement: "5.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.IdentityModel.Xml", requirement: "5.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Net.Http.Headers", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.NETCore.DotNetAppHost", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.NETCore.DotNetHostPolicy", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.NETCore.DotNetHostResolver", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.NETCore.Platforms", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.NETCore.Targets", requirement: "2.0.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Win32.Registry", requirement: "4.5.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "NETStandard.Library", requirement: "2.0.3", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Newtonsoft.Json", requirement: "11.0.2", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Newtonsoft.Json.Bson", requirement: "1.0.1", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "Remotion.Linq", requirement: "2.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "runtime.native.System", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "runtime.native.System.Data.SqlClient.sni", requirement: "4.5.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "runtime.native.System.IO.Compression", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "runtime.native.System.Net.Http", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "runtime.native.System.Security.Cryptography.Apple", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "runtime.native.System.Security.Cryptography.OpenSsl", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "runtime.win-arm64.runtime.native.System.Data.SqlClient.sni", requirement: "4.4.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "runtime.win-x64.runtime.native.System.Data.SqlClient.sni", requirement: "4.4.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "runtime.win-x86.runtime.native.System.Data.SqlClient.sni", requirement: "4.4.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.AppContext", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Buffers", requirement: "4.5.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Collections", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Collections.Concurrent", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Collections.Immutable", requirement: "1.5.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Collections.NonGeneric", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Collections.Specialized", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.ComponentModel.Annotations", requirement: "4.5.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Console", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Data.SqlClient", requirement: "4.6.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Diagnostics.Contracts", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Diagnostics.Debug", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Diagnostics.DiagnosticSource", requirement: "4.5.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Diagnostics.FileVersionInfo", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Diagnostics.StackTrace", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Diagnostics.Tools", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Diagnostics.Tracing", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Dynamic.Runtime", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Globalization", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Globalization.Calendars", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Globalization.Extensions", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.IdentityModel.Tokens.Jwt", requirement: "5.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Interactive.Async", requirement: "3.2.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.IO", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.IO.Compression", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.IO.FileSystem", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.IO.FileSystem.Primitives", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.IO.Pipelines", requirement: "4.5.2", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Linq", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Linq.Expressions", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Linq.Queryable", requirement: "4.0.1", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Memory", requirement: "4.5.1", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Net.Http", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Net.Primitives", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Net.WebSockets.WebSocketProtocol", requirement: "4.5.1", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Numerics.Vectors", requirement: "4.5.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.ObjectModel", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Private.DataContractSerialization", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Reflection", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Reflection.Emit", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Reflection.Emit.ILGeneration", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Reflection.Emit.Lightweight", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Reflection.Extensions", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Reflection.Metadata", requirement: "1.6.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Reflection.Primitives", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Reflection.TypeExtensions", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Resources.ResourceManager", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Runtime", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Runtime.CompilerServices.Unsafe", requirement: "4.5.1", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Runtime.Extensions", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Runtime.Handles", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Runtime.InteropServices", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Runtime.InteropServices.RuntimeInformation", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Runtime.Numerics", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Runtime.Serialization.Primitives", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Runtime.Serialization.Xml", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Security.AccessControl", requirement: "4.5.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Security.Claims", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Security.Cryptography.Algorithms", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Security.Cryptography.Cng", requirement: "4.5.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Security.Cryptography.Csp", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Security.Cryptography.Encoding", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Security.Cryptography.OpenSsl", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Security.Cryptography.Pkcs", requirement: "4.5.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Security.Cryptography.Primitives", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Security.Cryptography.X509Certificates", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Security.Cryptography.Xml", requirement: "4.5.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Security.Permissions", requirement: "4.5.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Security.Principal", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Security.Principal.Windows", requirement: "4.5.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Text.Encoding", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Text.Encoding.CodePages", requirement: "4.5.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Text.Encoding.Extensions", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Text.Encodings.Web", requirement: "4.5.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Text.RegularExpressions", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Threading", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Threading.Channels", requirement: "4.5.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Threading.Tasks", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Threading.Tasks.Extensions", requirement: "4.5.1", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Threading.Tasks.Parallel", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Threading.Thread", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.ValueTuple", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Xml.ReaderWriter", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Xml.XDocument", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Xml.XmlDocument", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Xml.XmlSerializer", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Xml.XPath", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
          Bibliothecary::Dependency.new(platform: "nuget", name: "System.Xml.XPath.XDocument", requirement: "4.3.0", type: "runtime", source: "packages.lock.json"),
        ],
        kind: "lockfile",
        project_name: nil,
        success: true,
      }
    )
  end

  it "parses dependencies from packages.config" do
    expect(described_class.analyse_contents("packages.config", load_fixture("packages.config"))).to eq({
                                                                                                         platform: "nuget",
                                                                                                         path: "packages.config",
                                                                                                         project_name: nil,
                                                                                                         dependencies: [
        Bibliothecary::Dependency.new(platform: "nuget", name: "AutoMapper", requirement: "2.1.267", type: "runtime", source: "packages.config"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Web.Infrastructure", requirement: "1.0.0.0", type: "runtime", source: "packages.config"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Mvc3Futures", requirement: "3.0.20105.0", type: "runtime", source: "packages.config"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Ninject", requirement: "3.0.1.10", type: "runtime", source: "packages.config"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Ninject.Web.Common", requirement: "3.0.0.7", type: "runtime", source: "packages.config"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "WebActivator", requirement: "1.5", type: "runtime", source: "packages.config"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Net.Compilers", requirement: "1.0.0", type: "development", source: "packages.config"),
      ],
                                                                                                         kind: "manifest",
                                                                                                         success: true,
                                                                                                       })
  end

  it "parses dependencies from example.csproj" do
    expect(described_class.analyse_contents("example.csproj", load_fixture("example.csproj"))).to eq({
                                                                                                       platform: "nuget",
                                                                                                       path: "example.csproj",
                                                                                                       project_name: nil,
                                                                                                       dependencies: [
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore", requirement: "1.1.1", type: "runtime", source: "example.csproj"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Mvc", requirement: "1.1.2", type: "runtime", source: "example.csproj"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.StaticFiles", requirement: "1.1.1", type: "runtime", source: "example.csproj"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.Logging.Debug", requirement: "1.1.1", type: "runtime", source: "example.csproj"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.Extensions.DependencyInjection", requirement: "1.1.1", type: "runtime", source: "example.csproj"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.VisualStudio.Web.BrowserLink", requirement: "1.1.0", type: "runtime", source: "example.csproj"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "System.Resources.Extensions", requirement: "4.7.0", type: "runtime", source: "example.csproj"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Contoso.Utility.UsefulStuff", requirement: "3.6.0", type: "development", source: "example.csproj"),
      ],
                                                                                                       kind: "manifest",
                                                                                                       success: true,
                                                                                                     })
  end

  it "parses dependencies from example-no-version.csproj" do
    expect(described_class.analyse_contents("example.csproj", load_fixture("example-no-version.csproj"))).to eq({
                                                                                                                  platform: "nuget",
                                                                                                                  path: "example.csproj",
                                                                                                                  dependencies: [
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.App", requirement: "*", type: "runtime", source: "example.csproj"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.Razor.Design", requirement: "2.2.0", type: "development", source: "example.csproj"),
      ],
                                                                                                                  kind: "manifest",
                                                                                                                  project_name: nil,
                                                                                                                  success: true,
                                                                                                                })
  end

  it "parses dependencies from example-update.csproj" do
    expect(described_class.analyse_contents("example-update.csproj", load_fixture("example-update.csproj"))).to eq({
                                                                                                                     platform: "nuget",
                                                                                                                     path: "example-update.csproj",
                                                                                                                     dependencies: [
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore", requirement: "1.1.1", type: "runtime", source: "example-update.csproj"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Microsoft.AspNetCore.StaticFiles", requirement: "2.2.0", type: "runtime", source: "example-update.csproj"),
      ],
                                                                                                                     kind: "manifest",
                                                                                                                     project_name: nil,
                                                                                                                     success: true,
                                                                                                                   })
  end

  it "parses dependencies from example-references-tag.csproj" do
    result = described_class.analyse_contents("example-references-tag.csproj", load_fixture("example-references-tag.csproj"))

    expect(result[:platform]).to eq("nuget")
    expect(result[:path]).to eq("example-references-tag.csproj")
    expect(result[:kind]).to eq("manifest")
    expect(result[:project_name]).to eq(nil)
    expect(result[:success]).to eq(true)
    expect(result[:error_message]).to eq(nil)
    expect(result[:error_location]).to eq(nil)
    expect(result[:dependencies]).to eq([
      Bibliothecary::Dependency.new(platform: "nuget", name: "FluentCommandLineParser", requirement: "1.0.25.0", type: "runtime", source: "example-references-tag.csproj"),
      Bibliothecary::Dependency.new(platform: "nuget", name: "log4net", requirement: "2.0.15.0", type: "runtime", source: "example-references-tag.csproj"),
      Bibliothecary::Dependency.new(platform: "nuget", name: "Sequel.Core.Cryptography", requirement: "1.0.0.0", type: "runtime", source: "example-references-tag.csproj"),
      Bibliothecary::Dependency.new(platform: "nuget", name: "System.Runtime.SomethingInternal", requirement: "1.0.0", type: "runtime", source: "example-references-tag.csproj"),
    ])
  end

  it "parses dependencies from .csproj with an xml tag" do
    source = <<~FILE
      <?xml version="1.0" encoding="utf-8"?>
      <Project Sdk="Microsoft.NET.Sdk.Web">
        <ItemGroup>
          <Reference Include="FluentCommandLineParser, Version=1.0.25.0, Culture=neutral, processorArchitecture=MSIL" />
        </ItemGroup>
      </Project>
    FILE

    result = described_class.analyse_contents("example-with-xml-tag.csproj", source)

    expect(result[:platform]).to eq("nuget")
    expect(result[:path]).to eq("example-with-xml-tag.csproj")
    expect(result[:kind]).to eq("manifest")
    expect(result[:project_name]).to eq(nil)
    expect(result[:success]).to eq(true)
    expect(result[:error_message]).to eq(nil)
    expect(result[:error_location]).to eq(nil)
    expect(result[:dependencies]).to eq([
      Bibliothecary::Dependency.new(platform: "nuget", name: "FluentCommandLineParser", requirement: "1.0.25.0", type: "runtime", source: "example-with-xml-tag.csproj"),
    ])
  end

  it "parses dependencies from example.nuspec" do
    expect(described_class.analyse_contents("example.nuspec", load_fixture("example.nuspec"))).to eq({
                                                                                                       platform: "nuget",
                                                                                                       path: "example.nuspec",
                                                                                                       project_name: nil,
                                                                                                       dependencies: [
        Bibliothecary::Dependency.new(platform: "nuget", name: "FubuCore", requirement: "3.2.0.3001", type: "runtime", source: "example.nuspec"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "HtmlTags", requirement: "[3.2.0.3001]", type: "runtime", source: "example.nuspec"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "DotNetZip", requirement: "*", type: "runtime", source: "example.nuspec"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "DevelopmentOnlyPackage", requirement: "1.2.3", type: "development", source: "example.nuspec"),
      ],
                                                                                                       kind: "manifest",
                                                                                                       success: true,
                                                                                                     })
  end

  it "parses dependencies from paket.lock" do
    expect(described_class.analyse_contents("paket.lock", load_fixture("paket.lock"))).to eq({
                                                                                               platform: "nuget",
                                                                                               path: "paket.lock",
                                                                                               project_name: nil,
                                                                                               dependencies: [
        Bibliothecary::Dependency.new(platform: "nuget", name: "Argu", requirement: "2.1", type: "runtime", source: "paket.lock"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Mono.Cecil", requirement: "0.9.6.1", type: "runtime", source: "paket.lock"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Chessie", requirement: "0.5.1", type: "runtime", source: "paket.lock"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "FSharp.Core", requirement: "4.0.0.1", type: "runtime", source: "paket.lock"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "Newtonsoft.Json", requirement: "9.0.1", type: "runtime", source: "paket.lock"),
      ],
                                                                                               kind: "lockfile",
                                                                                               success: true,
                                                                                             })
  end

  it "parses dependencies from project.assets.json" do
    expected = {
      platform: "nuget",
      path: "project.assets.json",
      dependencies: [
        Bibliothecary::Dependency.new(platform: "nuget", name: "a", requirement: "1.0.0", type: "runtime", source: "project.assets.json"),
        Bibliothecary::Dependency.new(platform: "nuget", name: "b", requirement: "1.0.0", type: "runtime", source: "project.assets.json"),
      ],
      kind: "lockfile",
      project_name: nil,
      success: true,
    }

    result = described_class.analyse_contents("project.assets.json", load_fixture("nuget_project.assets.json"))

    expect(result).to eq(expected)
  end

  it "matches valid manifest filepaths" do
    expect(described_class.match?("Project.json")).to be_truthy
    expect(described_class.match?("Project.lock.json")).to be_truthy
    expect(described_class.match?("packages.config")).to be_truthy
    expect(described_class.match?("paket.lock")).to be_truthy
    expect(described_class.match?("example.nuspec")).to be_truthy
    expect(described_class.match?("example.csproj")).to be_truthy
    expect(described_class.match?("project.assets.json")).to be_truthy
  end
end
