DeletePackageAsync() public method

Delete the specified package using Nuget.exe
public DeletePackageAsync ( string packageId, string version, string sourceName ) : Task
packageId string package to be deleted
version string version of package to be deleted
sourceName string source url
return Task
        public async Task UnlistPackage(string packageId, string version = "1.0.0", string apiKey = null, bool success = true)
        {
            if (string.IsNullOrEmpty(packageId))
            {
                throw new ArgumentException($"{nameof(packageId)} cannot be null or empty!");
            }

            WriteLine("Unlisting package '{0}', version '{1}'", packageId, version);

            var commandlineHelper = new CommandlineHelper(TestOutputHelper);
            var processResult     = await commandlineHelper.DeletePackageAsync(packageId, version, UrlHelper.V2FeedPushSourceUrl, apiKey);

            if (success)
            {
                Assert.True(processResult.ExitCode == 0,
                            "The package unlist via Nuget.exe did not succeed properly. Check the logs to see the process error and output stream.  Exit Code: " +
                            processResult.ExitCode + ". Error message: \"" + processResult.StandardError + "\"");
            }
            else
            {
                Assert.False(processResult.ExitCode == 0,
                             "The package unlist via Nuget.exe succeeded but was expected to fail. Check the logs to see the process error and output stream.  Exit Code: " +
                             processResult.ExitCode + ". Error message: \"" + processResult.StandardError + "\"");
            }
        }
        public async Task UnlistPackage(string packageId, string version = "1.0.0")
        {
            if (string.IsNullOrEmpty(packageId))
            {
                throw new ArgumentException($"{nameof(packageId)} cannot be null or empty!");
            }

            WriteLine("Unlisting package '{0}', version '{1}'", packageId, version);

            var commandlineHelper = new CommandlineHelper(TestOutputHelper);
            var processResult = await commandlineHelper.DeletePackageAsync(packageId, version, UrlHelper.V2FeedPushSourceUrl);

            Assert.True(processResult.ExitCode == 0,
                "The package unlist via Nuget.exe did not succeed properly. Check the logs to see the process error and output stream.  Exit Code: " +
                processResult.ExitCode + ". Error message: \"" + processResult.StandardError + "\"");
        }