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:
authornulltoken <emeric.fermas@gmail.com>2011-06-20 13:51:02 +0400
committernulltoken <emeric.fermas@gmail.com>2011-06-20 22:53:50 +0400
commit0c61d1de2886346134377cc35f4d69bf6c6af121 (patch)
treee8f69600e0f3fb1ef99ef1e66074a40fdc405718
parentb8d95590464df72564141e911432fd9682d7d2d7 (diff)
Apply some code beautification to some files
-rw-r--r--LibGit2Sharp.Tests/ObjectIdFixture.cs16
-rw-r--r--LibGit2Sharp/ObjectId.cs3
2 files changed, 10 insertions, 9 deletions
diff --git a/LibGit2Sharp.Tests/ObjectIdFixture.cs b/LibGit2Sharp.Tests/ObjectIdFixture.cs
index 4c66c41e..3fa62696 100644
--- a/LibGit2Sharp.Tests/ObjectIdFixture.cs
+++ b/LibGit2Sharp.Tests/ObjectIdFixture.cs
@@ -7,11 +7,11 @@ namespace LibGit2Sharp.Tests
[TestFixture]
public class ObjectIdFixture
{
- [TestCase("Dummy", typeof (ArgumentException))]
- [TestCase("", typeof (ArgumentException))]
- [TestCase("8e", typeof (ArgumentException))]
- [TestCase(null, typeof (ArgumentNullException))]
- [TestCase("ce08fe4884650f067bd5703b6a59a8b3b3c99a09dd", typeof (ArgumentException))]
+ [TestCase("Dummy", typeof(ArgumentException))]
+ [TestCase("", typeof(ArgumentException))]
+ [TestCase("8e", typeof(ArgumentException))]
+ [TestCase(null, typeof(ArgumentNullException))]
+ [TestCase("ce08fe4884650f067bd5703b6a59a8b3b3c99a09dd", typeof(ArgumentException))]
public void PreventsFromBuildingWithAnInvalidSha(string malformedSha, Type expectedExceptionType)
{
Assert.Throws(expectedExceptionType, () => new ObjectId(malformedSha));
@@ -20,7 +20,7 @@ namespace LibGit2Sharp.Tests
[Test]
public void CanConvertOidToSha()
{
- var bytes = new byte[] {206, 8, 254, 72, 132, 101, 15, 6, 123, 213, 112, 59, 106, 89, 168, 179, 179, 201, 154, 9};
+ var bytes = new byte[] { 206, 8, 254, 72, 132, 101, 15, 6, 123, 213, 112, 59, 106, 89, 168, 179, 179, 201, 154, 9 };
var id = new ObjectId(bytes);
@@ -32,13 +32,13 @@ namespace LibGit2Sharp.Tests
public void CanConvertShaToOid()
{
var id = new ObjectId("ce08fe4884650f067bd5703b6a59a8b3b3c99a09");
- 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});
+ 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 });
}
[Test]
public void CreatingObjectIdWithWrongNumberOfBytesThrows()
{
- var bytes = new byte[] {206, 8, 254, 72, 132, 101, 15, 6, 123, 213, 112, 59, 106, 89, 168, 179, 179, 201, 154};
+ var bytes = new byte[] { 206, 8, 254, 72, 132, 101, 15, 6, 123, 213, 112, 59, 106, 89, 168, 179, 179, 201, 154 };
Assert.Throws<ArgumentException>(() => { new ObjectId(bytes); });
}
diff --git a/LibGit2Sharp/ObjectId.cs b/LibGit2Sharp/ObjectId.cs
index d6dd1348..c26d8bbf 100644
--- a/LibGit2Sharp/ObjectId.cs
+++ b/LibGit2Sharp/ObjectId.cs
@@ -31,7 +31,8 @@ namespace LibGit2Sharp
/// Initializes a new instance of the <see cref="ObjectId"/> class.
/// </summary>
/// <param name="rawId">The byte array.</param>
- public ObjectId(byte[] rawId) : this(new GitOid{Id = rawId} )
+ public ObjectId(byte[] rawId)
+ : this(new GitOid { Id = rawId })
{
Ensure.ArgumentNotNull(rawId, "rawId");
Ensure.ArgumentConformsTo(rawId, b => b.Length == rawSize, "rawId");