Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryorah <yoram.harmelin@gmail.com>2014-04-30 17:40:55 +0400
committeryorah <yoram.harmelin@gmail.com>2014-06-12 14:13:40 +0400
commit4720e82cf52055fd62af4ac4b219c54ef164c899 (patch)
treed76a46eb3a034070303a1b65da08dcc02196e8c2 /LibGit2Sharp.Tests
parentb399005e901e01ed126b874c9a8a9c3954c20a28 (diff)
Introduce PatchEntryChanges
Exposes same properties than TreeEntryChanges through composition
Diffstat (limited to 'LibGit2Sharp.Tests')
-rw-r--r--LibGit2Sharp.Tests/DiffTreeToTreeFixture.cs18
1 files changed, 10 insertions, 8 deletions
diff --git a/LibGit2Sharp.Tests/DiffTreeToTreeFixture.cs b/LibGit2Sharp.Tests/DiffTreeToTreeFixture.cs
index c1b0bcce..4b7aec9b 100644
--- a/LibGit2Sharp.Tests/DiffTreeToTreeFixture.cs
+++ b/LibGit2Sharp.Tests/DiffTreeToTreeFixture.cs
@@ -786,11 +786,12 @@ namespace LibGit2Sharp.Tests
Assert.Equal(expectedPatchLength, patch.Content.Length);
- ContentChanges contentChanges = patch["numbers.txt"];
+ PatchEntryChanges entryChanges = patch["numbers.txt"];
- Assert.Equal(2, contentChanges.LinesAdded);
- Assert.Equal(1, contentChanges.LinesDeleted);
- Assert.Equal(expectedPatchLength, contentChanges.Patch.Length);
+ Assert.Equal(2, entryChanges.LinesAdded);
+ Assert.Equal(1, entryChanges.LinesDeleted);
+ Assert.Equal(expectedPatchLength, entryChanges.Patch.Length);
+ Assert.Equal("numbers.txt", entryChanges.Path);
}
}
@@ -881,14 +882,15 @@ namespace LibGit2Sharp.Tests
var patch = repo.Diff.Compare<Patch>(rootCommitTree, mergedCommitTree, compareOptions: compareOptions);
- ContentChanges contentChanges = patch["numbers.txt"];
+ PatchEntryChanges entryChanges = patch["numbers.txt"];
- Assert.Equal(3, contentChanges.LinesAdded);
- Assert.Equal(1, contentChanges.LinesDeleted);
+ Assert.Equal(3, entryChanges.LinesAdded);
+ Assert.Equal(1, entryChanges.LinesDeleted);
Assert.Equal(Expected("f8d44d7...7252fe2/numbers.txt-{0}-{1}.diff", contextLines, interhunkLines),
- contentChanges.Patch);
+ entryChanges.Patch);
Assert.Equal(Expected("f8d44d7...7252fe2/full-{0}-{1}.diff", contextLines, interhunkLines),
patch);
+ Assert.Equal("numbers.txt", entryChanges.Path);
}
}