public async Task WhenPackageHasSingleDependency_ThenReturnPackage() { var query = new GetDependenciesRequest("ByteDev.Crypto", "5.0.2", NuGetFrameworkFactory.CreateStandard("2.0")); var result = await _sut.GetDependenciesAsync(query); Assert.That(result.Single().Identity.ToString(), Is.EqualTo("ByteDev.Encoding.1.0.0")); }
public async Task WhenPackageHasNoDependencies_ThenReturnEmpty() { var query = new GetDependenciesRequest("ByteDev.Strings", "4.1.0", NuGetFrameworkFactory.CreateStandard("2.0")); var result = await _sut.GetDependenciesAsync(query); Assert.That(result, Is.Empty); }
public async Task WhenPackageHasTwoDependencies_ThenReturnPackages() { var query = new GetDependenciesRequest("ByteDev.Hibp", "3.0.0", NuGetFrameworkFactory.CreateStandard("2.0")); var result = await _sut.GetDependenciesAsync(query); Assert.That(result.First().Identity.ToString(), Is.EqualTo("ByteDev.Common.7.0.0")); Assert.That(result.Second().Identity.ToString(), Is.EqualTo("Newtonsoft.Json.11.0.2")); }
public async Task WhenPackageHasMultipleDependencies_ThenReturnPackages() { var query = new GetDependenciesRequest("ByteDev.Testing.NUnit", "1.1.0", NuGetFrameworkFactory.CreateStandard("2.0")); query.IgnoreAuthors.Add("Microsoft"); var result = await _sut.GetDependenciesAsync(query); Assert.That(result.First().Identity.ToString(), Is.EqualTo("ByteDev.Crypto.5.0.2")); Assert.That(result.Second().Identity.ToString(), Is.EqualTo("ByteDev.Encoding.1.0.0")); Assert.That(result.Third().Identity.ToString(), Is.EqualTo("NUnit.3.12.0")); }