Exemplo n.º 1
0
        public void EmptyContainerIsEmpty()
        {
            var tags      = new HashSet <Tag>();
            var container = new TagContainer(tags);

            container.Count().Should().Be(0);
        }
Exemplo n.º 2
0
        public void FindCommitTagsReturnsCorrectTag()
        {
            var commitA = new Commit("commit1");
            var commitB = new Commit("commit2");
            var tags    = new HashSet <Tag>
            {
                new("tag1", commitA),
                new("tag1", commitB),
            };
            var container = new TagContainer(tags);

            container.Count().Should().Be(2);
            var foundA = container.FindCommitTags(commitA);

            foundA.Should().ContainSingle();
            foundA.Should().Contain(new Tag("tag1", commitA));
        }
Exemplo n.º 3
0
        public void ContainerContainsTags()
        {
            var tags = new HashSet <Tag>
            {
                new("tag1", new("commit1")),
            };
            var container = new TagContainer(tags);

            container.Count().Should().Be(1);

            int count = 0;

            foreach (var obj in (container as IEnumerable))
            {
                obj.Equals(tags.First()).Should().BeTrue();
                count++;
            }
            count.Should().Be(1);
        }