Skip to content

#156 - Remove AssertExtensions class #159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions LibGit2Sharp.Tests/BlobFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public void CanGetBlobAsUtf8()
var blob = repo.Lookup<Blob>("a8233120f6ad708f843d861ce2b7228ec4e3dec6");

string text = blob.ContentAsUtf8();
text.ShouldEqual("hey there\n");
Assert.Equal("hey there\n", text);
}
}

Expand All @@ -25,7 +25,7 @@ public void CanGetBlobSize()
using (var repo = new Repository(BareTestRepoPath))
{
var blob = repo.Lookup<Blob>("a8233120f6ad708f843d861ce2b7228ec4e3dec6");
blob.Size.ShouldEqual(10);
Assert.Equal(10, blob.Size);
}
}

Expand All @@ -35,7 +35,7 @@ public void CanLookUpBlob()
using (var repo = new Repository(BareTestRepoPath))
{
var blob = repo.Lookup<Blob>("a8233120f6ad708f843d861ce2b7228ec4e3dec6");
blob.ShouldNotBeNull();
Assert.NotNull(blob);
}
}

Expand All @@ -46,10 +46,10 @@ public void CanReadBlobContent()
{
var blob = repo.Lookup<Blob>("a8233120f6ad708f843d861ce2b7228ec4e3dec6");
byte[] bytes = blob.Content;
bytes.Length.ShouldEqual(10);
Assert.Equal(10, bytes.Length);

string content = Encoding.UTF8.GetString(bytes);
content.ShouldEqual("hey there\n");
Assert.Equal("hey there\n", content);
}
}

Expand All @@ -63,7 +63,7 @@ public void CanReadBlobStream()
using (var tr = new StreamReader(blob.ContentStream, Encoding.UTF8))
{
string content = tr.ReadToEnd();
content.ShouldEqual("hey there\n");
Assert.Equal("hey there\n", content);
}
}
}
Expand Down Expand Up @@ -97,7 +97,7 @@ public void CanStageAFileGeneratedFromABlobContentStream()

repo.Index.Stage("small.txt");
IndexEntry entry = repo.Index["small.txt"];
entry.Id.Sha.ShouldEqual("baae1fb3760a73481ced1fa03dc15614142c19ef");
Assert.Equal("baae1fb3760a73481ced1fa03dc15614142c19ef", entry.Id.Sha);

var blob = repo.Lookup<Blob>(entry.Id.Sha);

Expand All @@ -110,7 +110,7 @@ public void CanStageAFileGeneratedFromABlobContentStream()
repo.Index.Stage("small.fromblob.txt");
IndexEntry newentry = repo.Index["small.fromblob.txt"];

newentry.Id.Sha.ShouldEqual("baae1fb3760a73481ced1fa03dc15614142c19ef");
Assert.Equal("baae1fb3760a73481ced1fa03dc15614142c19ef", newentry.Id.Sha);
}
}
}
Expand Down
Loading