Skip to content

Commit

Permalink
dotnet format
Browse files Browse the repository at this point in the history
  • Loading branch information
meevee98 committed Jan 14, 2020
1 parent 33d87b9 commit 5a7a157
Show file tree
Hide file tree
Showing 25 changed files with 118 additions and 118 deletions.
2 changes: 1 addition & 1 deletion neo.UnitTests/TestVerifiable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void Serialize(BinaryWriter writer)

public void SerializeUnsigned(BinaryWriter writer)
{
writer.Write((string) testStr);
writer.Write((string)testStr);
}
}
}
2 changes: 1 addition & 1 deletion neo.UnitTests/UT_AccountState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public void Serialize()
byte[] requiredData = new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0 };

data.Length.Should().Be(25);
for (int i=0; i<25; i++)
for (int i = 0; i < 25; i++)
{
data[i].Should().Be(requiredData[i]);
}
Expand Down
2 changes: 1 addition & 1 deletion neo.UnitTests/UT_AssetState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ private void setupAssetStateWithValues(AssetState assetState, out UInt256 assetI
feeAddress = new UInt160(TestUtils.GetByteArray(20, 0x21));
assetState.FeeAddress = feeAddress;

owner = ECPoint.DecodePoint(TestUtils.GetByteArray(1,0x00), ECCurve.Secp256r1);
owner = ECPoint.DecodePoint(TestUtils.GetByteArray(1, 0x00), ECCurve.Secp256r1);
assetState.Owner = owner;

admin = new UInt160(TestUtils.GetByteArray(20, 0x22));
Expand Down
4 changes: 2 additions & 2 deletions neo.UnitTests/UT_ClaimTransaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void TestSetup()
[TestMethod]
public void Claims_Get()
{
uut.Claims.Should().BeNull();
uut.Claims.Should().BeNull();
}

[TestMethod]
Expand Down Expand Up @@ -101,7 +101,7 @@ public void ToJson()
jObj["net_fee"].AsString().Should().Be("0");
((JArray)jObj["scripts"]).Count.Should().Be(0);

JArray claims = (JArray) jObj["claims"];
JArray claims = (JArray)jObj["claims"];
claims.Count.Should().Be(1);
claims[0]["txid"].AsString().Should().Be("0x2020202020202020202020202020202020202020202020202020202020202042");
claims[0]["vout"].AsNumber().Should().Be(0);
Expand Down
4 changes: 2 additions & 2 deletions neo.UnitTests/UT_CoinReference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public void Equals_SameHash()
ushort prevIndexVal;
setupCoinReferenceWithVals(uut, out prevHashVal, out prevIndexVal);
CoinReference newCoinRef = new CoinReference();
setupCoinReferenceWithVals(newCoinRef, out prevHashVal, out prevIndexVal);
setupCoinReferenceWithVals(newCoinRef, out prevHashVal, out prevIndexVal);

uut.Equals(newCoinRef).Should().BeTrue();
}
Expand Down Expand Up @@ -182,7 +182,7 @@ public void Class_GetHashCode()
{
UInt256 prevHashVal;
ushort prevIndexVal;
setupCoinReferenceWithVals(uut, out prevHashVal, out prevIndexVal);
setupCoinReferenceWithVals(uut, out prevHashVal, out prevIndexVal);

uut.GetHashCode().Should().Be(538976344);
}
Expand Down
6 changes: 3 additions & 3 deletions neo.UnitTests/UT_ConsensusServiceMailbox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace Neo.UnitTests
{
[TestClass]
public class UT_ConsensusServiceMailbox : TestKit
public class UT_ConsensusServiceMailbox : TestKit
{
private static readonly Random TestRandom = new Random(1337); // use fixed seed for guaranteed determinism

Expand Down Expand Up @@ -42,10 +42,10 @@ public void ConsensusServiceMailbox_Test_IsHighPriority()
uut.IsHighPriority(new ConsensusService.SetViewNumber()).Should().Be(true);
uut.IsHighPriority(new ConsensusService.Timer()).Should().Be(true);
uut.IsHighPriority(new Blockchain.PersistCompleted()).Should().Be(true);

// any random object should not have priority
object obj = null;
uut.IsHighPriority(obj).Should().Be(false);
uut.IsHighPriority(obj).Should().Be(false);
}
}
}
6 changes: 3 additions & 3 deletions neo.UnitTests/UT_Header.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private void assertStandardHeaderTestVals(UInt256 val256, UInt256 merkRoot, UInt
uut.NextConsensus.Should().Be(val160);
uut.Witness.InvocationScript.Length.Should().Be(0);
uut.Witness.Size.Should().Be(scriptVal.Size);
uut.Witness.VerificationScript[0].Should().Be(scriptVal.VerificationScript[0]);
uut.Witness.VerificationScript[0].Should().Be(scriptVal.VerificationScript[0]);
}

[TestMethod]
Expand All @@ -83,11 +83,11 @@ public void Equals_SameHeader()
{
uut.Equals(uut).Should().BeTrue();
}

[TestMethod]
public void Equals_SameHash()
{
Header newHeader = new Header();
Header newHeader = new Header();
UInt256 prevHash = new UInt256(TestUtils.GetByteArray(32, 0x42));
UInt256 merkRoot;
UInt160 val160;
Expand Down
6 changes: 3 additions & 3 deletions neo.UnitTests/UT_Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public void GetHashData()
TestVerifiable verifiable = new TestVerifiable();
byte[] res = verifiable.GetHashData();
res.Length.Should().Be(8);
byte[] requiredData = new byte[] {7, 116, 101, 115, 116, 83, 116, 114};
byte[] requiredData = new byte[] { 7, 116, 101, 115, 116, 83, 116, 114 };
for (int i = 0; i < requiredData.Length; i++)
{
res[i].Should().Be(requiredData[i]);
Expand All @@ -26,14 +26,14 @@ public void GetHashData()
public void Sign()
{
TestVerifiable verifiable = new TestVerifiable();
byte[] res = verifiable.Sign(new KeyPair(TestUtils.GetByteArray(32,0x42)));
byte[] res = verifiable.Sign(new KeyPair(TestUtils.GetByteArray(32, 0x42)));
res.Length.Should().Be(64);
}

[TestMethod]
public void ToScriptHash()
{
byte[] testByteArray = TestUtils.GetByteArray(64,0x42);
byte[] testByteArray = TestUtils.GetByteArray(64, 0x42);
UInt160 res = testByteArray.ToScriptHash();
res.Should().Be(UInt160.Parse("2d3b96ae1bcc5a585e075e3b81920210dec16302"));
}
Expand Down
Loading

0 comments on commit 5a7a157

Please sign in to comment.