Skip to content

Commit 2cd67a8

Browse files
authored
Merge pull request #2198 from planetarium/release/1.3.1
Release/1.3.1
2 parents 538afea + 49f6726 commit 2cd67a8

File tree

88 files changed

+6848
-476
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+6848
-476
lines changed

.Lib9c.Tests/Action/BattleArena13Test.cs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public void Execute_Backward_Compatibility_Success()
195195
[Fact]
196196
public void Execute_InvalidAddressException()
197197
{
198-
var action = new BattleArena
198+
var action = new BattleArena13
199199
{
200200
myAvatarAddress = _avatar1Address,
201201
enemyAvatarAddress = _avatar1Address,
@@ -218,7 +218,7 @@ public void Execute_InvalidAddressException()
218218
[Fact]
219219
public void Execute_FailedLoadStateException()
220220
{
221-
var action = new BattleArena
221+
var action = new BattleArena13
222222
{
223223
myAvatarAddress = _avatar2Address,
224224
enemyAvatarAddress = _avatar1Address,
@@ -241,7 +241,7 @@ public void Execute_FailedLoadStateException()
241241
[Fact]
242242
public void Execute_NotEnoughClearedStageLevelException()
243243
{
244-
var action = new BattleArena
244+
var action = new BattleArena13
245245
{
246246
myAvatarAddress = _avatar4Address,
247247
enemyAvatarAddress = _avatar2Address,
@@ -266,7 +266,7 @@ public void Execute_NotEnoughClearedStageLevelException()
266266
[Fact]
267267
public void Execute_SheetRowNotFoundException()
268268
{
269-
var action = new BattleArena
269+
var action = new BattleArena13
270270
{
271271
myAvatarAddress = _avatar1Address,
272272
enemyAvatarAddress = _avatar2Address,
@@ -289,7 +289,7 @@ public void Execute_SheetRowNotFoundException()
289289
[Fact]
290290
public void Execute_ThisArenaIsClosedException()
291291
{
292-
var action = new BattleArena
292+
var action = new BattleArena13
293293
{
294294
myAvatarAddress = _avatar1Address,
295295
enemyAvatarAddress = _avatar2Address,
@@ -313,7 +313,7 @@ public void Execute_ThisArenaIsClosedException()
313313
[Fact]
314314
public void Execute_ArenaParticipantsNotFoundException()
315315
{
316-
var action = new BattleArena
316+
var action = new BattleArena13
317317
{
318318
myAvatarAddress = _avatar1Address,
319319
enemyAvatarAddress = _avatar2Address,
@@ -374,7 +374,7 @@ public void Execute_AddressNotFoundInArenaParticipantsException(bool excludeMe)
374374
round,
375375
random);
376376

377-
var action = new BattleArena
377+
var action = new BattleArena13
378378
{
379379
myAvatarAddress = _avatar1Address,
380380
enemyAvatarAddress = _avatar2Address,
@@ -444,7 +444,7 @@ public void Execute_ValidateScoreDifferenceException(bool isSigner)
444444
arenaScore.AddScore(900);
445445
previousStates = previousStates.SetState(arenaScoreAdr, arenaScore.Serialize());
446446

447-
var action = new BattleArena
447+
var action = new BattleArena13
448448
{
449449
myAvatarAddress = _avatar1Address,
450450
enemyAvatarAddress = _avatar2Address,
@@ -513,7 +513,7 @@ public void Execute_InsufficientBalanceException()
513513
beforeInfo.UseTicket(beforeInfo.Ticket);
514514
previousStates = previousStates.SetState(arenaInfoAdr, beforeInfo.Serialize());
515515

516-
var action = new BattleArena
516+
var action = new BattleArena13
517517
{
518518
myAvatarAddress = _avatar1Address,
519519
enemyAvatarAddress = _avatar2Address,
@@ -579,7 +579,7 @@ public void Execute_ExceedPlayCountException()
579579
throw new ArenaInformationNotFoundException($"arenaInfoAdr : {arenaInfoAdr}");
580580
}
581581

582-
var action = new BattleArena
582+
var action = new BattleArena13
583583
{
584584
myAvatarAddress = _avatar1Address,
585585
enemyAvatarAddress = _avatar2Address,
@@ -659,7 +659,7 @@ public void Execute_ExceedTicketPurchaseLimitException()
659659
previousStates.GetGoldCurrency());
660660
previousStates = previousStates.MintAsset(context, _agent1Address, price);
661661

662-
var action = new BattleArena
662+
var action = new BattleArena13
663663
{
664664
myAvatarAddress = _avatar1Address,
665665
enemyAvatarAddress = _avatar2Address,
@@ -732,7 +732,7 @@ public void Execute_ExceedTicketPurchaseLimitDuringIntervalException()
732732
beforeInfo.BuyTicket(roundData.MaxPurchaseCount);
733733
}
734734

735-
var purchasedCountDuringInterval = arenaInfoAdr.Derive(BattleArena.PurchasedCountKey);
735+
var purchasedCountDuringInterval = arenaInfoAdr.Derive(BattleArena13.PurchasedCountKey);
736736
previousStates = previousStates
737737
.SetState(arenaInfoAdr, beforeInfo.Serialize())
738738
.SetState(
@@ -744,7 +744,7 @@ public void Execute_ExceedTicketPurchaseLimitDuringIntervalException()
744744
previousStates.GetGoldCurrency());
745745
previousStates = previousStates.MintAsset(context, _agent1Address, price);
746746

747-
var action = new BattleArena
747+
var action = new BattleArena13
748748
{
749749
myAvatarAddress = _avatar1Address,
750750
enemyAvatarAddress = _avatar2Address,
@@ -823,7 +823,7 @@ public void Execute_CoolDownBlockException()
823823
beforeInfo.BuyTicket(roundData.MaxPurchaseCount);
824824
}
825825

826-
var action = new BattleArena
826+
var action = new BattleArena13
827827
{
828828
myAvatarAddress = _avatar1Address,
829829
enemyAvatarAddress = _avatar2Address,
@@ -922,7 +922,7 @@ public void ExecuteDuplicatedException(int slotIndex, int runeId, int slotIndex2
922922
Random = new TestRandom(),
923923
});
924924

925-
var action = new BattleArena
925+
var action = new BattleArena13
926926
{
927927
myAvatarAddress = _avatar1Address,
928928
enemyAvatarAddress = _avatar2Address,
@@ -1029,7 +1029,7 @@ public void Execute_ValidateDuplicateTicketPurchaseException()
10291029

10301030
beforeInfo.UseTicket(ArenaInformation.MaxTicketCount);
10311031

1032-
var purchasedCountDuringInterval = arenaInfoAdr.Derive(BattleArena.PurchasedCountKey);
1032+
var purchasedCountDuringInterval = arenaInfoAdr.Derive(BattleArena13.PurchasedCountKey);
10331033
previousStates = previousStates
10341034
.SetState(arenaInfoAdr, beforeInfo.Serialize())
10351035
.SetState(
@@ -1041,7 +1041,7 @@ public void Execute_ValidateDuplicateTicketPurchaseException()
10411041
previousStates.GetGoldCurrency());
10421042
previousStates = previousStates.MintAsset(context, _agent1Address, price);
10431043

1044-
var action = new BattleArena
1044+
var action = new BattleArena13
10451045
{
10461046
myAvatarAddress = _avatar1Address,
10471047
enemyAvatarAddress = _avatar2Address,
@@ -1157,7 +1157,7 @@ private void Execute(
11571157
}
11581158
}
11591159

1160-
var action = new BattleArena
1160+
var action = new BattleArena13
11611161
{
11621162
myAvatarAddress = myAvatarAddress,
11631163
enemyAvatarAddress = enemyAvatarAddress,
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace Lib9c.Tests.Action
1818
using Xunit;
1919
using Xunit.Abstractions;
2020

21-
public class BuyProductTest
21+
public class BuyProduct2Test
2222
{
2323
private static readonly Address BuyerAgentAddress = new Address("47d082a115c63e7b58b1532d20e631538eafadde");
2424
private static readonly Address BuyerAvatarAddress = new Address("340f110b91d0577a9ae0ea69ce15269436f217da");
@@ -37,7 +37,7 @@ public class BuyProductTest
3737
private readonly Guid _orderId;
3838
private IAccount _initialState;
3939

40-
public BuyProductTest(ITestOutputHelper outputHelper)
40+
public BuyProduct2Test(ITestOutputHelper outputHelper)
4141
{
4242
Log.Logger = new LoggerConfiguration()
4343
.MinimumLevel.Verbose()
@@ -296,7 +296,7 @@ public void Execute_Throw_Exception(params ExecuteMember[] validateMembers)
296296

297297
foreach (var productInfo in validateMember.ProductInfos)
298298
{
299-
var action = new BuyProduct
299+
var action = new BuyProduct2
300300
{
301301
AvatarAddress = BuyerAvatarAddress,
302302
ProductInfos = new[] { productInfo },
@@ -315,12 +315,12 @@ public void Execute_Throw_Exception(params ExecuteMember[] validateMembers)
315315
public void Execute_Throw_ArgumentOutOfRangeException()
316316
{
317317
var productInfos = new List<ItemProductInfo>();
318-
for (int i = 0; i < BuyProduct.Capacity + 1; i++)
318+
for (int i = 0; i < BuyProduct2.Capacity + 1; i++)
319319
{
320320
productInfos.Add(new ItemProductInfo());
321321
}
322322

323-
var action = new BuyProduct
323+
var action = new BuyProduct2
324324
{
325325
AvatarAddress = _sellerAvatarAddress2,
326326
ProductInfos = productInfos,

.Lib9c.Tests/Action/BuyTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ public void Execute(params OrderData[] orderDataList)
351351
Signer = _buyerAgentAddress,
352352
});
353353

354-
var buyProductAction = new BuyProduct
354+
var buyProductAction = new BuyProduct2
355355
{
356356
AvatarAddress = _buyerAvatarAddress,
357357
ProductInfos = productInfos,
@@ -630,7 +630,7 @@ public void Execute_ErrorCode(ErrorCodeMember errorCodeMember)
630630
action.errors.Select(r => r.errorCode)
631631
);
632632

633-
var buyProductAction = new BuyProduct
633+
var buyProductAction = new BuyProduct2
634634
{
635635
AvatarAddress = _buyerAvatarAddress,
636636
ProductInfos = new[] { productInfo },

.Lib9c.Tests/Action/CancelProductRegistrationTest.cs renamed to .Lib9c.Tests/Action/CancelProductRegistration0Test.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace Lib9c.Tests.Action
1717
using Xunit;
1818
using Xunit.Abstractions;
1919

20-
public class CancelProductRegistrationTest
20+
public class CancelProductRegistration0Test
2121
{
2222
private readonly IAccount _initialState;
2323
private readonly Address _agentAddress;
@@ -26,7 +26,7 @@ public class CancelProductRegistrationTest
2626
private readonly TableSheets _tableSheets;
2727
private readonly GameConfigState _gameConfigState;
2828

29-
public CancelProductRegistrationTest(ITestOutputHelper outputHelper)
29+
public CancelProductRegistration0Test(ITestOutputHelper outputHelper)
3030
{
3131
Log.Logger = new LoggerConfiguration()
3232
.MinimumLevel.Verbose()
@@ -84,7 +84,7 @@ public void Execute_Throw_InvalidAddressException(
8484
bool invalidAgentAddress
8585
)
8686
{
87-
var action = new CancelProductRegistration
87+
var action = new CancelProductRegistration0
8888
{
8989
AvatarAddress = _avatarAddress,
9090
ProductInfos = new List<IProductInfo>
@@ -129,7 +129,7 @@ public void Execute_Throw_ProductNotFoundException()
129129
{
130130
var context = new ActionContext();
131131
var prevState = _initialState.MintAsset(context, _avatarAddress, 1 * RuneHelper.StakeRune);
132-
var registerProduct = new RegisterProduct
132+
var registerProduct = new RegisterProduct2
133133
{
134134
AvatarAddress = _avatarAddress,
135135
RegisterInfos = new List<IRegisterInfo>
@@ -159,7 +159,7 @@ public void Execute_Throw_ProductNotFoundException()
159159
(List)nexState.GetState(ProductsState.DeriveAddress(_avatarAddress)));
160160
var productId = Assert.Single(productsState.ProductIds);
161161

162-
var action = new CancelProductRegistration
162+
var action = new CancelProductRegistration0
163163
{
164164
AvatarAddress = _avatarAddress,
165165
ProductInfos = new List<IProductInfo>
@@ -196,12 +196,12 @@ public void Execute_Throw_ProductNotFoundException()
196196
public void Execute_Throw_ArgumentOutOfRangeException()
197197
{
198198
var productInfos = new List<IProductInfo>();
199-
for (int i = 0; i < CancelProductRegistration.Capacity + 1; i++)
199+
for (int i = 0; i < CancelProductRegistration0.Capacity + 1; i++)
200200
{
201201
productInfos.Add(new ItemProductInfo());
202202
}
203203

204-
var action = new CancelProductRegistration
204+
var action = new CancelProductRegistration0
205205
{
206206
AvatarAddress = _avatarAddress,
207207
ProductInfos = productInfos,

.Lib9c.Tests/Action/CombinationConsumableTest.cs renamed to .Lib9c.Tests/Action/CombinationConsumable8Test.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ namespace Lib9c.Tests.Action
1515
using Xunit;
1616
using static Lib9c.SerializeKeys;
1717

18-
public class CombinationConsumableTest
18+
public class CombinationConsumable8Test
1919
{
2020
private readonly Address _agentAddress;
2121
private readonly Address _avatarAddress;
2222
private readonly IRandom _random;
2323
private readonly TableSheets _tableSheets;
2424
private IAccount _initialState;
2525

26-
public CombinationConsumableTest()
26+
public CombinationConsumable8Test()
2727
{
2828
_agentAddress = new PrivateKey().ToAddress();
2929
_avatarAddress = _agentAddress.Derive("avatar");
@@ -113,7 +113,7 @@ public void Execute(bool backward)
113113
.SetState(_avatarAddress, avatarState.SerializeV2());
114114
}
115115

116-
var action = new CombinationConsumable
116+
var action = new CombinationConsumable8
117117
{
118118
avatarAddress = _avatarAddress,
119119
recipeId = row.Id,

.Lib9c.Tests/Action/CombinationEquipmentTest.cs renamed to .Lib9c.Tests/Action/CombinationEquipment16Test.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace Lib9c.Tests.Action
2323
using Xunit.Abstractions;
2424
using static Lib9c.SerializeKeys;
2525

26-
public class CombinationEquipmentTest
26+
public class CombinationEquipment16Test
2727
{
2828
private readonly Address _agentAddress;
2929
private readonly Address _avatarAddress;
@@ -34,7 +34,7 @@ public class CombinationEquipmentTest
3434
private readonly AgentState _agentState;
3535
private readonly AvatarState _avatarState;
3636

37-
public CombinationEquipmentTest(ITestOutputHelper outputHelper)
37+
public CombinationEquipment16Test(ITestOutputHelper outputHelper)
3838
{
3939
Log.Logger = new LoggerConfiguration()
4040
.MinimumLevel.Verbose()
@@ -75,7 +75,7 @@ public CombinationEquipmentTest(ITestOutputHelper outputHelper)
7575

7676
var combinationSlotState = new CombinationSlotState(
7777
_slotAddress,
78-
GameConfig.RequireClearedStageLevel.CombinationEquipmentAction);
78+
0);
7979

8080
_initialState = new MockStateDelta()
8181
.SetState(_slotAddress, combinationSlotState.Serialize())
@@ -280,7 +280,7 @@ bool previousCostStateExist
280280
Assert.Null(state.GetState(dailyCostAddress));
281281
Assert.Null(state.GetState(weeklyCostAddress));
282282

283-
var action = new CombinationEquipment
283+
var action = new CombinationEquipment16
284284
{
285285
avatarAddress = _avatarAddress,
286286
slotIndex = slotIndex,
@@ -460,7 +460,7 @@ public void ExecuteWithCheckingHammerPointState(
460460
}
461461
}
462462

463-
var action = new CombinationEquipment
463+
var action = new CombinationEquipment16
464464
{
465465
avatarAddress = _avatarAddress,
466466
slotIndex = 0,
@@ -520,7 +520,7 @@ public void AddAndUnlockOption()
520520
Guid.NewGuid(),
521521
default);
522522
Assert.Equal(0, equipment.optionCountFromCombination);
523-
CombinationEquipment.AddAndUnlockOption(
523+
CombinationEquipment16.AddAndUnlockOption(
524524
_agentState,
525525
null,
526526
equipment,

0 commit comments

Comments
 (0)