Skip to content

Commit

Permalink
UT
Browse files Browse the repository at this point in the history
  • Loading branch information
superboyiii authored Nov 10, 2020
1 parent 75a1cc2 commit 9214572
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/Neo.Network.RPC.Tests/UT_PolicyAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ public async Task TestGetFeePerByte()
}

[TestMethod]
public async Task TestGetBlockedAccounts()
public async Task TestIsBlocked()
{
byte[] testScript = NativeContract.Policy.Hash.MakeScript("getBlockedAccounts");
UT_TransactionManager.MockInvokeScript(rpcClientMock, testScript, new ContractParameter { Type = ContractParameterType.Array, Value = new[] { new ContractParameter { Type = ContractParameterType.Hash160, Value = UInt160.Zero } } });
byte[] testScript = NativeContract.Policy.Hash.MakeScript("isBlocked", UInt160.Zero);
UT_TransactionManager.MockInvokeScript(rpcClientMock, testScript, new ContractParameter { Type = ContractParameterType.Boolean, Value = true } );

var result = await policyAPI.GetBlockedAccountsAsync();
Assert.AreEqual(UInt160.Zero, result[0]);
var result = await policyAPI.IsBlockedAsync(UInt160.Zero);
Assert.AreEqual(true, result);
}
}
}

0 comments on commit 9214572

Please sign in to comment.