public async Task GetPrereleaseVersionsToDelete_MinIsLatestRelease_UnreleasedTip()
        {
            _mockHttp.When("https://azuresearch-usnc.nuget.org/query?q=packageid:L10NSharp&prerelease=true")
            .Respond("application/json", responseJsonBegin + "4.0.3-beta0003" +
                     responseJsonMiddle + @"
				{
					""version"": ""4.0.2-beta0001"",
					""downloads"": 0,
					""@id"": ""https://api.nuget.org/v3/registration3/l10nsharp/4.0.2-beta0001.json""
				},
				{
					""version"": ""4.0.2"",
					""downloads"": 28,
					""@id"": ""https://api.nuget.org/v3/registration3/l10nsharp/4.0.2.json""
				},
				{
					""version"": ""4.0.3-beta0002"",
					""downloads"": 0,
					""@id"": ""https://api.nuget.org/v3/registration3/l10nsharp/4.0.3-beta0002.json""
				},
				{
					""version"": ""4.0.3-beta0003"",
					""downloads"": 0,
					""@id"": ""https://api.nuget.org/v3/registration3/l10nsharp/4.0.3-beta0003.json""
				}"                 + responseJsonEnd);
            NuGetPackage.HttpClient = _mockHttp.ToHttpClient();

            var sut = new NuGetPackage("L10NSharp", min: "4.0.2");

            Assert.That(await sut.GetPrereleaseVersionsToDelete(), Is.Empty);
        }
        public async Task GetPrereleaseVersionsToDelete_TipIsUnreleased_PreviousUnreleased()
        {
            _mockHttp.When("https://azuresearch-usnc.nuget.org/query?q=packageid:L10NSharp&prerelease=true")
            .Respond("application/json", responseJsonBegin + "4.0.3-beta0003" +
                     responseJsonMiddle + @"
				{
					""version"": ""4.0.2-beta0002"",
					""downloads"": 0,
					""@id"": ""https://api.nuget.org/v3/registration3/l10nsharp/4.0.2-beta0002.json""
				},
				{
					""version"": ""4.0.2"",
					""downloads"": 28,
					""@id"": ""https://api.nuget.org/v3/registration3/l10nsharp/4.0.2.json""
				},
				{
					""version"": ""4.0.3-beta0003"",
					""downloads"": 0,
					""@id"": ""https://api.nuget.org/v3/registration3/l10nsharp/4.0.3-beta0003.json""
				}"                 + responseJsonEnd);
            NuGetPackage.HttpClient = _mockHttp.ToHttpClient();

            var sut = new NuGetPackage("L10NSharp");

            Assert.That(await sut.GetPrereleaseVersionsToDelete(),
                        Is.EquivalentTo(new [] { SemanticVersion.Parse("4.0.2-beta0002") }));
        }
        public async Task GetPrereleaseVersionsToDelete()
        {
            _mockHttp.When("https://azuresearch-usnc.nuget.org/query?q=packageid:L10NSharp&prerelease=true")
            .Respond("application/json", responseJsonBegin + "4.0.2" + responseJsonMiddle +
                     allVersions + responseJsonEnd);
            NuGetPackage.HttpClient = _mockHttp.ToHttpClient();

            var sut = new NuGetPackage("L10NSharp");

            Assert.That(await sut.GetPrereleaseVersionsToDelete(),
                        Is.EquivalentTo(new [] { SemanticVersion.Parse("4.0.2-beta0003") }));
        }