Esempio n. 1
0
        public void DownloadVersion_UseCachedVersion()
        {
            //arrange
            mockFileProxy.Setup(x => x.FileExists(It.IsAny <string>())).Returns(true);

            //act
            sut.DownloadVersion("any", "any");

            //assert
            mockEffectiveStrategy.Verify(x => x.DownloadVersion(It.IsAny <string>(), It.IsAny <string>()), Times.Never);
            mockFileProxy.Verify(x => x.CopyFile(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <bool>()));
        }
Esempio n. 2
0
        public void DownloadVersion_UseCachedVersion()
        {
            //arrange
            mockFileProxy.Setup(x => x.FileExists(ItHasFilename("paket.exe"))).Returns(true);
            MockReadAndCreate();

            //act
            sut.DownloadVersion("any", "any", null);

            //assert
            mockEffectiveStrategy.Verify(x => x.DownloadVersion(It.IsAny <string>(), It.IsAny <string>(), null), Times.Never);
            mockFileProxy.Verify(x => x.CreateExclusive("any"));
        }