8000 Apply some code beautification to some files · dotjosh/libgit2sharp@0c61d1d · GitHub
[go: up one dir, main page]

Skip to content

Commit 0c61d1d

Browse files
committed
Apply some code beautification to some files
1 parent b8d9559 commit 0c61d1d

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

LibGit2Sharp.Tests/ObjectIdFixture.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ namespace LibGit2Sharp.Tests
77
[TestFixture]
88
public class ObjectIdFixture
99
{
10-
[TestCase("Dummy", typeof (ArgumentException))]
11-
[TestCase("", typeof (ArgumentException))]
12-
[TestCase("8e", typeof (ArgumentException))]
13-
[TestCase(null, typeof (ArgumentNullException))]
14-
[TestCase("ce08fe4884650f067bd5703b6a59a8b3b3c99a09dd", typeof (ArgumentException))]
10+
[TestCase("Dummy", typeof(ArgumentException))]
11+
[TestCase("", typeof(ArgumentException))]
12+
[TestCase("8e", typeof(ArgumentException))]
13+
[TestCase(null, typeof(ArgumentNullException))]
14+
[TestCase("ce08fe4884650f067bd5703b6a59a8b3b3c99a09dd", typeof(ArgumentException))]
1515
public void PreventsFromBuildingWithAnInvalidSha(string malformedSha, Type expectedExceptionType)
1616
{
1717
Assert.Throws(expectedExceptionType, () => new ObjectId(malformedSha));
@@ -20,7 +20,7 @@ public void PreventsFromBuildingWithAnInvalidSha(string malformedSha, Type expec
2020
[Test]
2121
public void CanConvertOidToSha()
2222
{
23-
var bytes = new byte[] {206, 8, 254, 72, 132, 101, 15, 6, 123, 213, 112, 59, 106, 89, 168, 179, 179, 201, 154, 9};
23+
var bytes = new byte[] { 206, 8, 254, 72, 132, 101, 15, 6, 123, 213, 112, 59, 106, 89, 168, 179, 179, 201, 154, 9 };
2424

2525
var id = new ObjectId(bytes);
2626

@@ -32,13 +32,13 @@ public void CanConvertOidToSha()
3232
public void CanConvertShaToOid()
3333
{
3434
var id = new ObjectId("ce08fe4884650f067bd5703b6a59a8b3b3c99a09");
35-
id.RawId.ShouldEqual(new byte[] {206, 8, 254, 72, 132, 101, 15, 6, 123, 213, 112, 59, 106, 89, 168, 179, 179, 201, 154, 9});
35+
id.RawId.ShouldEqual(new byte[] { 206, 8, 254, 72, 132, 101, 15, 6, 123, 213, 112, 59, 106, 89, 168, 179, 179, 201, 154, 9 });
3636
}
3737

3838
[Test]
3939
public void CreatingObjectIdWithWrongNumberOfBytesThrows()
4040
{
41-
var bytes = new byte[] {206, 8, 254, 72, 132, 101, 15, 6, 123, 213, 112, 59, 106, 89, 168, 179, 179, 201, 154};
41+
var bytes = new byte[] { 206, 8, 254, 72, 132, 101, 15, 6, 123, 213, 112, 59, 106, 89, 168, 179, 179, 201, 154 };
4242

4343
Assert.Throws<ArgumentException>(() => { new ObjectId(bytes); });
4444
}

LibGit2Sharp/ObjectId.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ internal ObjectId(GitOid oid)
3131
/// Initializes a new instance of the <see cref="ObjectId"/> class.
3232
/// </summary>
3333
/// <param name="rawId">The byte array.</param>
34-
public ObjectId(byte[] rawId) : this(new GitOid{Id = rawId} )
34+
public ObjectId(byte[] rawId)
35+
: this(new GitOid { Id = rawId })
3536
{
3637
Ensure.ArgumentNotNull(rawId, "rawId");
3738
Ensure.ArgumentConformsTo(rawId, b => b.Length == rawSize, "rawId");

0 commit comments

Comments
 (0)
0