public void DeletePackage_IllegalVersion()
        {
            _mockHttp.Expect(HttpMethod.Delete, "https://www.nuget.org/api/v2/package/L10NSharp/4.0.3-beta0003")
            .WithHeaders("X-NuGet-ApiKey", "apikey12345");
            NuGetPackage.HttpClient = _mockHttp.ToHttpClient();

            var sut = new NuGetPackage("L10NSharp", "apikey12345");

            Assert.That(async() => await sut.DeletePackage(null),
                        Throws.Exception.TypeOf <ArgumentException>());
        }
        public void DeletePackage_HappyPath(HttpStatusCode statusCode)
        {
            _mockHttp.Expect(HttpMethod.Delete, "https://www.nuget.org/api/v2/package/L10NSharp/4.0.3-beta0003")
            .WithHeaders("X-NuGet-ApiKey", "apikey12345").Respond(statusCode);
            NuGetPackage.HttpClient = _mockHttp.ToHttpClient();

            var sut = new NuGetPackage("L10NSharp", "apikey12345");

            Assert.That(async() => await sut.DeletePackage(SemanticVersion.Parse("4.0.3-beta0003")),
                        Throws.Nothing);
        }
        public void DeletePackage_QuotaExceeded()
        {
            _mockHttp.Expect(HttpMethod.Delete, "https://www.nuget.org/api/v2/package/L10NSharp/4.0.3-beta0003")
            .WithHeaders("X-NuGet-ApiKey", "apikey12345").Respond(HttpStatusCode.Forbidden);
            NuGetPackage.HttpClient = _mockHttp.ToHttpClient();

            var sut = new NuGetPackage("L10NSharp", "apikey12345");

            Assert.That(async() => await sut.DeletePackage(SemanticVersion.Parse("4.0.3-beta0003")),
                        Throws.Exception.TypeOf <QuotaExceededException>());
        }