Ejemplo n.º 1
0
        public void Execute_Force_CallsClearCache()
        {
            _cacheManager.Setup(x => x.ClearCache()).Verifiable();

            var target = new ClearCommand(_cacheManager.Object, new[] {"-f"});
            target.Execute();

            _cacheManager.Verify();
        }
Ejemplo n.º 2
0
        public void Execute_DryRun_DoesNotClearCache()
        {
            // mock is strict, so calling ClearCache will throw
            _cacheManager.Setup(x => x.ListFiles()).Returns(new GitBinFileInfo[0]);

            var target = new ClearCommand(_cacheManager.Object, new[] { "-n" });
            target.Execute();

            Assert.Pass();
        }