diff options
author | Keith Dahlby <dahlbyk@gmail.com> | 2013-11-20 00:40:37 +0400 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2013-11-20 02:27:14 +0400 |
commit | 6b6a44a083531aabf0f5ce1f6600f9f70fc739ff (patch) | |
tree | 5646677042ea86fa1901065e117cee22d432402d /LibGit2Sharp.Tests | |
parent | bedccca83f013177d702d4ae48991d5c9986d7b0 (diff) |
Fix undisposed stream in test
Diffstat (limited to 'LibGit2Sharp.Tests')
-rw-r--r-- | LibGit2Sharp.Tests/BlobFixture.cs | 6 |
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); |