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:
authorKeith Dahlby <dahlbyk@gmail.com>2013-11-20 00:40:37 +0400
committernulltoken <emeric.fermas@gmail.com>2013-11-20 02:27:14 +0400
commit6b6a44a083531aabf0f5ce1f6600f9f70fc739ff (patch)
tree5646677042ea86fa1901065e117cee22d432402d /LibGit2Sharp.Tests
parentbedccca83f013177d702d4ae48991d5c9986d7b0 (diff)
Fix undisposed stream in test
Diffstat (limited to 'LibGit2Sharp.Tests')
-rw-r--r--LibGit2Sharp.Tests/BlobFixture.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/LibGit2Sharp.Tests/BlobFixture.cs b/LibGit2Sharp.Tests/BlobFixture.cs
index 24f5d0b7..765a0e7f 100644
--- a/LibGit2Sharp.Tests/BlobFixture.cs
+++ b/LibGit2Sharp.Tests/BlobFixture.cs
@@ -67,7 +67,11 @@ namespace LibGit2Sharp.Tests
var commit = repo.Commit("bom", Constants.Signature, Constants.Signature);
var blob = (Blob)commit.Tree[bomFile].Target;
- Assert.Equal(expectedContentBytes, blob.GetContentStream().Length);
+ Assert.Equal(expectedContentBytes, blob.Size);
+ using (var stream = blob.GetContentStream())
+ {
+ Assert.Equal(expectedContentBytes, stream.Length);
+ }
var textDetected = blob.GetContentText();
Assert.Equal(content, textDetected);