Skip to content

Commit

Permalink
add more unit test for "claim_stake_reward8"
Browse files Browse the repository at this point in the history
  • Loading branch information
boscohyun committed Aug 29, 2023
1 parent 144aa4f commit d4a9834
Showing 1 changed file with 32 additions and 4 deletions.
36 changes: 32 additions & 4 deletions .Lib9c.Tests/Action/ClaimStakeRewardTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ public void Serialization()
0L
)]
// stake before currency as reward, non prev.
// receive v2(w/o currency) * 2, receive v2(w/ currency). check GARAGE.
[InlineData(
StakeState.CurrencyAsRewardStartIndex - StakeState.RewardInterval * 2,
10_000_000L,
Expand All @@ -153,6 +154,7 @@ public void Serialization()
100_000L
)]
// stake before currency as reward, prev.
// receive v2(w/o currency), receive v2(w/ currency). check GARAGE.
[InlineData(
StakeState.CurrencyAsRewardStartIndex - StakeState.RewardInterval * 2,
10_000_000L,
Expand All @@ -165,7 +167,33 @@ public void Serialization()
"GARAGE",
100_000L
)]
// stake before v3(crystal), non prev.
// stake before v3(crystal), non prev. receive v2. check CRYSTAL.
[InlineData(
StakeState.StakeRewardSheetV3Index - 1,
500L,
null,
StakeState.StakeRewardSheetV3Index - 1 + StakeState.RewardInterval,
125,
2,
0,
AgentAddressHex,
"CRYSTAL",
0L
)]
// stake after v3(crystal), non prev. receive v3. check CRYSTAL.
[InlineData(
StakeState.StakeRewardSheetV3Index,
500L,
null,
StakeState.StakeRewardSheetV3Index + StakeState.RewardInterval,
125,
2,
0,
AgentAddressHex,
"CRYSTAL",
5_000L
)]
// stake before v3(crystal), non prev. receive v2 * 2, receive v3. check CRYSTAL.
[InlineData(
StakeState.StakeRewardSheetV3Index - StakeState.RewardInterval * 2,
10_000_000L,
Expand All @@ -178,7 +206,7 @@ public void Serialization()
"CRYSTAL",
1_000_000_000L
)]
// stake before v3(crystal), prev.
// stake before v3(crystal), prev. receive v2, receive v3. check CRYSTAL.
[InlineData(
StakeState.StakeRewardSheetV3Index - StakeState.RewardInterval * 2,
10_000_000L,
Expand All @@ -191,7 +219,7 @@ public void Serialization()
"CRYSTAL",
1_000_000_000L
)]
// stake after v3(crystal), non prev.
// stake after v3(crystal), non prev. receive v2 * 2, receive v3. check CRYSTAL.
[InlineData(
StakeState.StakeRewardSheetV3Index,
10_000_000L,
Expand All @@ -204,7 +232,7 @@ public void Serialization()
"CRYSTAL",
3_000_000_000L
)]
// stake after v3(crystal), prev.
// stake after v3(crystal), prev. receive v2, receive v3. check CRYSTAL.
[InlineData(
StakeState.StakeRewardSheetV3Index,
10_000_000L,
Expand Down

0 comments on commit d4a9834

Please sign in to comment.