Skip to content

Commit

Permalink
[Typo] Unit Tests - UT_ProtocolSettings.CreateHKSettings (#3383)
Browse files Browse the repository at this point in the history
* Typeo with `CreateHKSettings`

* fix ut

---------

Co-authored-by: Shargon <[email protected]>
Co-authored-by: NGD Admin <[email protected]>
  • Loading branch information
3 people authored Jul 7, 2024
1 parent 94f1a72 commit e5abfa1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions tests/Neo.UnitTests/SmartContract/Native/UT_NativeContract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class active : IHardforkActivable
[TestMethod]
public void TestActiveDeprecatedIn()
{
string json = UT_ProtocolSettings.CreateHKSettings("\"HF_Cockatrice\": 20");
string json = UT_ProtocolSettings.CreateHFSettings("\"HF_Cockatrice\": 20");
var file = Path.GetTempFileName();
File.WriteAllText(file, json);
ProtocolSettings settings = ProtocolSettings.Load(file, false);
Expand All @@ -89,7 +89,7 @@ public void TestGetContract()
[TestMethod]
public void TestIsInitializeBlock()
{
string json = UT_ProtocolSettings.CreateHKSettings("\"HF_Cockatrice\": 20");
string json = UT_ProtocolSettings.CreateHFSettings("\"HF_Cockatrice\": 20");

var file = Path.GetTempFileName();
File.WriteAllText(file, json);
Expand Down
10 changes: 5 additions & 5 deletions tests/Neo.UnitTests/UT_ProtocolSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void TestGetMillisecondsPerBlock()
[TestMethod]
public void HardForkTestBAndNotA()
{
string json = CreateHKSettings("\"HF_Basilisk\": 4120000");
string json = CreateHFSettings("\"HF_Basilisk\": 4120000");

var file = Path.GetTempFileName();
File.WriteAllText(file, json);
Expand All @@ -74,7 +74,7 @@ public void HardForkTestBAndNotA()
[TestMethod]
public void HardForkTestAAndNotB()
{
string json = CreateHKSettings("\"HF_Aspidochelone\": 0");
string json = CreateHFSettings("\"HF_Aspidochelone\": 0");

var file = Path.GetTempFileName();
File.WriteAllText(file, json);
Expand All @@ -96,7 +96,7 @@ public void HardForkTestAAndNotB()
[TestMethod]
public void HardForkTestNone()
{
string json = CreateHKSettings("");
string json = CreateHFSettings("");

var file = Path.GetTempFileName();
File.WriteAllText(file, json);
Expand All @@ -117,14 +117,14 @@ public void HardForkTestNone()
[TestMethod]
public void HardForkTestAMoreThanB()
{
string json = CreateHKSettings("\"HF_Aspidochelone\": 4120001, \"HF_Basilisk\": 4120000");
string json = CreateHFSettings("\"HF_Aspidochelone\": 4120001, \"HF_Basilisk\": 4120000");
var file = Path.GetTempFileName();
File.WriteAllText(file, json);
Assert.ThrowsException<ArgumentException>(() => ProtocolSettings.Load(file, false));
File.Delete(file);
}

internal static string CreateHKSettings(string hf)
internal static string CreateHFSettings(string hf)
{
return @"
{
Expand Down

0 comments on commit e5abfa1

Please sign in to comment.