Exemple #1
0
        public async Task AddAsMostRecentAsync_should_add_new_path_as_top_entry()
        {
            const string repoToAdd = "https://path.to/add";
            var          history   = new List <Repository>
            {
                new Repository("http://path1/"),
                new Repository("http://path3/"),
                new Repository("http://path4/"),
                new Repository("http://path5/"),
            };

            _repositoryStorage.Load(Key).Returns(x => history);

            var newHistory = await _manager.AddAsMostRecentAsync(repoToAdd);

            newHistory.Count.Should().Be(5);
            newHistory[0].Path.Should().Be(repoToAdd);
        }