public void ShouldNotSucceedAndReturnConflicts() { _mergeResult.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; }); _mergeResult.ShouldBeEquivalentTo(new MergeInfo { Message = "Could not merge test into master because of conflicts. Please merge manually", SourceBranch = "test", TargetBranch = "master", Status = MergeResult.Conflicts, Conflicts = Enumerable.Range(1, 2).Select(i => new ConflictInfo { Type = ConflictType.Remove, Path = $"file\\key {i}" }).ToList() }); }
public void FirstMergesShouldSuccedWithValidInfo() => _firstMergeResult.ShouldBeEquivalentTo(MergeInfo.Succeeded("test2", "master", _commitBeforeSecondMerge));
public void MergeShouldSuccedWithValidInfo() => _mergeResult.ShouldBeEquivalentTo(MergeInfo.Succeeded("test", "master", string.Empty));