Skip to content

Commit b17d8aa

Browse files
committed
test: Fix query test failure for validator power
1 parent c1a205d commit b17d8aa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/Libplanet.Explorer.Tests/GraphTypes/BlockTypeTest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public async void Query()
122122
{ "blockHash", lastVotes[0].BlockHash.ToString() },
123123
{ "timestamp", new DateTimeOffsetGraphType().Serialize(lastVotes[0].Timestamp) },
124124
{ "validatorPublicKey", lastVotes[0].ValidatorPublicKey.ToString() },
125-
{ "validatorPower", lastVotes[0].ValidatorPower },
125+
{ "validatorPower", lastVotes[0].ValidatorPower?.ToString() },
126126
{ "flag", lastVotes[0].Flag.ToString() },
127127
{ "signature", ByteUtil.Hex(lastVotes[0].Signature) },
128128
}

test/Libplanet.Explorer.Tests/GraphTypes/VoteTypeTest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public async void Query()
5757
Assert.Equal(vote.BlockHash.ToString(), resultData["blockHash"]);
5858
Assert.Equal(new DateTimeOffsetGraphType().Serialize(vote.Timestamp), resultData["timestamp"]);
5959
Assert.Equal(vote.ValidatorPublicKey.ToString(), resultData["validatorPublicKey"]);
60-
Assert.Equal(vote.ValidatorPower, resultData["validatorPower"]);
60+
Assert.Equal(vote.ValidatorPower?.ToString(), resultData["validatorPower"]);
6161
Assert.Equal(vote.Flag.ToString(), resultData["flag"]);
6262
Assert.Equal(ByteUtil.Hex(vote.Signature), resultData["signature"]);
6363
}

0 commit comments

Comments
 (0)