Ejemplo n.º 1
0
        public void GitDescribeProvider_returns_nulls_for_invalid_revision()
        {
            var commitId = ObjectId.Random();

            _module.GetDescribe(commitId).Returns(x => null);
            var(precedingTag, commitCount) = _provider.Get(commitId);

            precedingTag.Should().BeNullOrEmpty();
            commitCount.Should().BeNullOrEmpty();
        }
        public void GitDescribeProvider_returns_nulls_for_invalid_revision()
        {
            // xxxxxx is not a valid revision.
            // RunGitCmd returns "fatal: Not a valid object name xxxxxx"
            _module.GetDescribe("xxxxxx").Returns(x => null);
            var(precedingTag, commitCount) = _provider.Get("xxxxxx");

            precedingTag.Should().BeNullOrEmpty();
            commitCount.Should().BeNullOrEmpty();
        }