Ejemplo n.º 1
0
        public void ShouldNotSucceedAndReturnConflicts()
        {
            _rebaseResult.Conflicts.ForEach((c, i) =>
            {
                var targetBlob  = Repo.Lookup <Blob>(new ObjectId(c.TargetSha));
                var targetValue = targetBlob.GetContentText();
                var value       = i + 1;

                c.SourceSha.Should().BeNull();
                targetValue.Should().Be(MapToDocumentValue(value, true));

                c.TargetSha = null;
            });

            _rebaseResult.ShouldBeEquivalentTo(new RebaseInfo
            {
                Message      = "Could not rebase test onto master because of conflicts. Please merge manually",
                SourceBranch = "test",
                TargetBranch = "master",
                Status       = RebaseResult.Conflicts,
                Conflicts    = Enumerable.Range(1, 2).Select(i => new ConflictInfo {
                    Type = ConflictType.Remove, Path = $"file\\key {i}"
                }).ToList()
            });
        }
Ejemplo n.º 2
0
 public void RebaseShouldSuccedWithValidInfo() =>
 _rebaseResult.ShouldBeEquivalentTo(RebaseInfo.Succeeded("test", "master", Repo.Branches["test"].Tip.Sha));
Ejemplo n.º 3
0
 public void RebaseShouldSuccedWithValidInfo() =>
 _rebaseResult.ShouldBeEquivalentTo(RebaseInfo.Succeeded("test", "master", string.Empty));