Пример #1
0
        public void DownloadHashFile()
        {
            var expectedPath = BootstrapperHelper.GetTempFile("paket-sha256.txt");
            var expectedUrl  = string.Format(GitHubDownloadStrategy.Constants.PaketCheckSumDownloadUrlTemplate, "42.0");

            var hashFilePath = sut.DownloadHashFile("42.0");

            Assert.That(hashFilePath, Is.EqualTo(expectedPath));
            mockWebProxy.Verify(x => x.DownloadFile(expectedUrl, expectedPath), Times.Once);
        }
Пример #2
0
        public void DownloadHashFile()
        {
            var expectedUrl = string.Format(GitHubDownloadStrategy.Constants.PaketCheckSumDownloadUrlTemplate, "42.0");

            mockWebProxy.Setup(x => x.DownloadString(expectedUrl)).Returns("123test");

            var hashFile = sut.DownloadHashFile("42.0");

            Assert.That(hashFile.Content, Is.EquivalentTo(new[] { "123test" }));
            mockWebProxy.Verify(x => x.DownloadString(expectedUrl), Times.Once);
        }