public void DownloadPackage_ReturnsFailureObjectWhenDownloadThrowsAnException()
        {
            var gc = new Mock <IGregClient>();

            gc.Setup(x => x.Execute(It.IsAny <PackageDownload>())).Throws(new Exception("Failed to get your package!"));

            var pc = new PackageManagerClient(gc.Object, MockMaker.Empty <IPackageUploadBuilder>());

            string downloadPath;
            var    res = pc.DownloadPackage("1", "0.1", out downloadPath);

            Assert.IsNull(downloadPath);
            Assert.IsFalse(res.Success);
        }
        public void DownloadPackage_ReturnsFailureObjectWhenDownloadThrowsAnException()
        {
            var gc = new Mock<IGregClient>();
            gc.Setup(x => x.Execute(It.IsAny<PackageDownload>())).Throws(new Exception("Failed to get your package!"));

            var pc = new PackageManagerClient(gc.Object, MockMaker.Empty<IPackageUploadBuilder>(), "");

            string downloadPath;
            var res = pc.DownloadPackage("1", "0.1", out downloadPath);

            Assert.IsNull(downloadPath);
            Assert.IsFalse(res.Success);
        }