public void Resolve_should_return_path_from_git_file_if_present()
        {
            _file.Exists(_gitFile).Returns(true);
            _file.ReadLines(_gitFile).Returns(new[] { "", " ", @"gitdir: c:/dev/repo/.git/modules/Externals/Git.hub", "text" });

            _resolver.Resolve(_workingDir).Should().Be(@"c:\dev\repo\.git\modules\Externals\Git.hub\");

            _directory.DidNotReceive().Exists(_gitWorkingDir);
        }
Пример #2
0
        public async Task ClearCacheAsync_should_return_if_folder_absent()
        {
            _directory.Exists(Arg.Any <string>()).Returns(false);

            await _cacheCleaner.ClearCacheAsync();

            _directory.DidNotReceive().GetFiles(Arg.Any <string>());
        }
        public async Task AddImage_should_exit_if_stream_null()
        {
            await _cache.AddImageAsync("file", null);

            _directory.DidNotReceive().Exists(_folderPath);
        }