From 825be37968b41e7548cbde6720c7c02be55d0272 Mon Sep 17 00:00:00 2001 From: tyrosine1153 Date: Wed, 1 Nov 2023 16:48:26 +0900 Subject: [PATCH] delete reference of new action from test code --- .Lib9c.Tests/Action/BuyTest.cs | 4 +-- .Lib9c.Tests/Action/MarketValidationTest.cs | 6 ++-- .../Action/Scenario/ArenaScenarioTest.cs | 2 +- .../Action/Scenario/AuraScenarioTest.cs | 10 +++---- .../CombinationAndRapidCombinationTest.cs | 2 +- .Lib9c.Tests/Action/Scenario/ItemCraftTest.cs | 8 +++--- .../Action/Scenario/MarketScenarioTest.cs | 28 +++++++++---------- .../AdditionalOptionRateByFixedValueTest.cs | 4 +-- .../Action/Scenario/Pet/CommonTest.cs | 4 +-- .../Pet/DiscountMaterialCostCrystalTest.cs | 2 +- .../Pet/IncreaseBlockPerHourglassTest.cs | 4 +-- .../Scenario/Pet/ReduceRequiredBlockTest.cs | 2 +- .../Action/Scenario/RapidCombinationTest.cs | 4 +-- .../Action/Scenario/RuneScenarioTest.cs | 2 +- .Lib9c.Tests/Action/SellCancellationTest.cs | 2 +- .../Extensions/EquipmentExtensionsTest.cs | 2 +- .../Action/CreateOrReplaceAvatar.cs | 2 +- Lib9c/Action/AuraSummon.cs | 2 +- 18 files changed, 45 insertions(+), 45 deletions(-) diff --git a/.Lib9c.Tests/Action/BuyTest.cs b/.Lib9c.Tests/Action/BuyTest.cs index b26a6cf18e..e37e9a3a3f 100644 --- a/.Lib9c.Tests/Action/BuyTest.cs +++ b/.Lib9c.Tests/Action/BuyTest.cs @@ -351,7 +351,7 @@ public void Execute(params OrderData[] orderDataList) Signer = _buyerAgentAddress, }); - var buyProductAction = new BuyProduct + var buyProductAction = new BuyProduct2 { AvatarAddress = _buyerAvatarAddress, ProductInfos = productInfos, @@ -630,7 +630,7 @@ public void Execute_ErrorCode(ErrorCodeMember errorCodeMember) action.errors.Select(r => r.errorCode) ); - var buyProductAction = new BuyProduct + var buyProductAction = new BuyProduct2 { AvatarAddress = _buyerAvatarAddress, ProductInfos = new[] { productInfo }, diff --git a/.Lib9c.Tests/Action/MarketValidationTest.cs b/.Lib9c.Tests/Action/MarketValidationTest.cs index 77f7eadc1a..e66d1ee252 100644 --- a/.Lib9c.Tests/Action/MarketValidationTest.cs +++ b/.Lib9c.Tests/Action/MarketValidationTest.cs @@ -203,7 +203,7 @@ public void Validate_RegisterInfo(params RegisterInfosMember[] validateMembers) { foreach (var registerInfo in validateMember.RegisterInfos) { - var registerProduct = new RegisterProduct + var registerProduct = new RegisterProduct2 { AvatarAddress = AvatarAddress, RegisterInfos = new[] { registerInfo }, @@ -237,7 +237,7 @@ public void Validate_ProductInfo(params ProductInfosMember[] validateMembers) { foreach (var productInfo in validateMember.ProductInfos) { - var buyProduct = new BuyProduct + var buyProduct = new BuyProduct2 { AvatarAddress = AvatarAddress, ProductInfos = new[] { productInfo }, @@ -245,7 +245,7 @@ public void Validate_ProductInfo(params ProductInfosMember[] validateMembers) Assert.Throws(validateMember.Exc, () => buyProduct.Execute(actionContext)); - var cancelRegister = new CancelProductRegistration + var cancelRegister = new CancelProductRegistration0 { AvatarAddress = AvatarAddress, ProductInfos = new List() { productInfo }, diff --git a/.Lib9c.Tests/Action/Scenario/ArenaScenarioTest.cs b/.Lib9c.Tests/Action/Scenario/ArenaScenarioTest.cs index d3a9c06aeb..48aefabda1 100644 --- a/.Lib9c.Tests/Action/Scenario/ArenaScenarioTest.cs +++ b/.Lib9c.Tests/Action/Scenario/ArenaScenarioTest.cs @@ -102,7 +102,7 @@ public IAccount JoinArena( var preCurrency = roundData.EntranceFee * _crystal; _state = _state.MintAsset(context, signer, preCurrency); - var action = new JoinArena() + var action = new JoinArena3() { championshipId = roundData.ChampionshipId, round = roundData.Round, diff --git a/.Lib9c.Tests/Action/Scenario/AuraScenarioTest.cs b/.Lib9c.Tests/Action/Scenario/AuraScenarioTest.cs index 84a505b9ed..d870f5023e 100644 --- a/.Lib9c.Tests/Action/Scenario/AuraScenarioTest.cs +++ b/.Lib9c.Tests/Action/Scenario/AuraScenarioTest.cs @@ -97,7 +97,7 @@ public void HackAndSlash() var itemSlotStateAddress = ItemSlotState.DeriveAddress(_avatarAddress, BattleType.Adventure); Assert.Null(_initialState.GetState(itemSlotStateAddress)); - var has = new HackAndSlash + var has = new HackAndSlash21 { StageId = 1, AvatarAddress = _avatarAddress, @@ -154,7 +154,7 @@ public void Raid() avatarState.worldInformation.Serialize() ); - var raid = new Raid + var raid = new Raid6 { AvatarAddress = _avatarAddress, EquipmentIds = new List @@ -197,7 +197,7 @@ public void Arena() avatarState.worldInformation.Serialize() ); - var join = new JoinArena + var join = new JoinArena3 { avatarAddress = avatarAddress, championshipId = 1, @@ -227,7 +227,7 @@ public void Arena() var enemyAvatarAddress = avatarAddress.Equals(_avatarAddress) ? _enemyAvatarAddress : _avatarAddress; - var battle = new BattleArena + var battle = new BattleArena13 { myAvatarAddress = avatarAddress, enemyAvatarAddress = enemyAvatarAddress, @@ -328,7 +328,7 @@ public void Market() _avatarAddress.Derive(LegacyWorldInformationKey), avatarState.worldInformation.Serialize()); - var register = new RegisterProduct + var register = new RegisterProduct2 { AvatarAddress = _avatarAddress, RegisterInfos = new List diff --git a/.Lib9c.Tests/Action/Scenario/CombinationAndRapidCombinationTest.cs b/.Lib9c.Tests/Action/Scenario/CombinationAndRapidCombinationTest.cs index 1de62f4895..fb12529d15 100644 --- a/.Lib9c.Tests/Action/Scenario/CombinationAndRapidCombinationTest.cs +++ b/.Lib9c.Tests/Action/Scenario/CombinationAndRapidCombinationTest.cs @@ -145,7 +145,7 @@ public void Case(int randomSeed, int[] optionNumbers) e.RequiredGold == 0); var recipeRow = _tableSheets.EquipmentItemRecipeSheet.OrderedList.First(e => e.SubRecipeIds.Contains(subRecipeRow.Id)); - var combinationEquipmentAction = new CombinationEquipment + var combinationEquipmentAction = new CombinationEquipment16 { avatarAddress = _avatarAddress, slotIndex = 0, diff --git a/.Lib9c.Tests/Action/Scenario/ItemCraftTest.cs b/.Lib9c.Tests/Action/Scenario/ItemCraftTest.cs index 6e3d994bb3..c1bcf4a79f 100644 --- a/.Lib9c.Tests/Action/Scenario/ItemCraftTest.cs +++ b/.Lib9c.Tests/Action/Scenario/ItemCraftTest.cs @@ -117,7 +117,7 @@ public void CraftEquipmentTest(int randomSeed, int[] targetItemIdList) ); // Do Combination Action - var action = new CombinationEquipment + var action = new CombinationEquipment16 { avatarAddress = _avatarAddr, slotIndex = i, @@ -205,7 +205,7 @@ public void CraftConsumableTest(int randomSeed, int[] targetItemIdList) { // Do combination action var recipe = recipeList[i]; - var action = new CombinationConsumable + var action = new CombinationConsumable8 { avatarAddress = _avatarAddr, slotIndex = i, @@ -288,7 +288,7 @@ int[] targetItemIdList var eventRow = _tableSheets.EventScheduleSheet[eventScheduleId]; // Do combination action var recipe = recipeList[i]; - var action = new EventConsumableItemCrafts + var action = new EventConsumableItemCrafts0 { AvatarAddress = _avatarAddr, EventScheduleId = eventScheduleId, @@ -386,7 +386,7 @@ int[] targetItemIdList } } - var action = new EventMaterialItemCrafts + var action = new EventMaterialItemCrafts0 { AvatarAddress = _avatarAddr, EventScheduleId = eventScheduleId, diff --git a/.Lib9c.Tests/Action/Scenario/MarketScenarioTest.cs b/.Lib9c.Tests/Action/Scenario/MarketScenarioTest.cs index c0013b6e43..58275cd63c 100644 --- a/.Lib9c.Tests/Action/Scenario/MarketScenarioTest.cs +++ b/.Lib9c.Tests/Action/Scenario/MarketScenarioTest.cs @@ -135,7 +135,7 @@ public void Register_And_Buy() var random = new TestRandom(); var productInfoList = new List(); - var action = new RegisterProduct + var action = new RegisterProduct2 { AvatarAddress = _sellerAvatarAddress, RegisterInfos = new List @@ -166,7 +166,7 @@ public void Register_And_Buy() }); var nextAvatarState = nextState.GetAvatarStateV2(_sellerAvatarAddress); Assert.Empty(nextAvatarState.inventory.Items); - Assert.Equal(_gameConfigState.ActionPointMax - RegisterProduct.CostAp, nextAvatarState.actionPoint); + Assert.Equal(_gameConfigState.ActionPointMax - RegisterProduct2.CostAp, nextAvatarState.actionPoint); var productsState = new ProductsState((List)nextState.GetState(ProductsState.DeriveAddress(_sellerAvatarAddress))); @@ -209,7 +209,7 @@ public void Register_And_Buy() } } - var action2 = new RegisterProduct + var action2 = new RegisterProduct2 { AvatarAddress = _sellerAvatarAddress2, RegisterInfos = new List @@ -240,7 +240,7 @@ public void Register_And_Buy() }); var nextAvatarState2 = nextState2.GetAvatarStateV2(_sellerAvatarAddress2); Assert.Empty(nextAvatarState2.inventory.Items); - Assert.Equal(_gameConfigState.ActionPointMax - RegisterProduct.CostAp, nextAvatarState2.actionPoint); + Assert.Equal(_gameConfigState.ActionPointMax - RegisterProduct2.CostAp, nextAvatarState2.actionPoint); var productList2 = new ProductsState((List)nextState2.GetState(ProductsState.DeriveAddress(_sellerAvatarAddress2))); @@ -283,7 +283,7 @@ public void Register_And_Buy() } } - var action3 = new BuyProduct + var action3 = new BuyProduct2 { AvatarAddress = _buyerAvatarAddress, ProductInfos = productInfoList, @@ -358,7 +358,7 @@ public void Register_And_Cancel() _initialState = _initialState .SetState(_sellerAvatarAddress, _sellerAvatarState.Serialize()) .MintAsset(context, _sellerAvatarAddress, 1 * RuneHelper.StakeRune); - var action = new RegisterProduct + var action = new RegisterProduct2 { AvatarAddress = _sellerAvatarAddress, RegisterInfos = new List @@ -398,7 +398,7 @@ public void Register_And_Cancel() var nextAvatarState = nextState.GetAvatarStateV2(_sellerAvatarAddress); Assert.Empty(nextAvatarState.inventory.Items); - Assert.Equal(_gameConfigState.ActionPointMax - RegisterProduct.CostAp, nextAvatarState.actionPoint); + Assert.Equal(_gameConfigState.ActionPointMax - RegisterProduct2.CostAp, nextAvatarState.actionPoint); var marketState = new MarketState(nextState.GetState(Addresses.Market)); Assert.Contains(_sellerAvatarAddress, marketState.AvatarAddresses); @@ -441,7 +441,7 @@ public void Register_And_Cancel() } Assert.All(new[] { nonFungibleProductId, fungibleProductId, assetProductId }, productId => Assert.NotEqual(default, productId)); - var action2 = new CancelProductRegistration + var action2 = new CancelProductRegistration0 { AvatarAddress = _sellerAvatarAddress, ProductInfos = new List @@ -493,7 +493,7 @@ public void Register_And_Cancel() ); } - Assert.Equal(_gameConfigState.ActionPointMax - RegisterProduct.CostAp - CancelProductRegistration.CostAp, latestAvatarState.actionPoint); + Assert.Equal(_gameConfigState.ActionPointMax - RegisterProduct2.CostAp - CancelProductRegistration0.CostAp, latestAvatarState.actionPoint); var sellProductList = new ProductsState((List)latestState.GetState(productsStateAddress)); Assert.Empty(sellProductList.ProductIds); @@ -530,7 +530,7 @@ public void Register_And_ReRegister() _initialState = _initialState .MintAsset(context, _sellerAvatarAddress, 2 * RuneHelper.StakeRune) .SetState(_sellerAvatarAddress, _sellerAvatarState.Serialize()); - var action = new RegisterProduct + var action = new RegisterProduct2 { AvatarAddress = _sellerAvatarAddress, RegisterInfos = new List @@ -570,7 +570,7 @@ public void Register_And_ReRegister() var nextAvatarState = nextState.GetAvatarStateV2(_sellerAvatarAddress); Assert.Empty(nextAvatarState.inventory.Items); - Assert.Equal(_gameConfigState.ActionPointMax - RegisterProduct.CostAp, nextAvatarState.actionPoint); + Assert.Equal(_gameConfigState.ActionPointMax - RegisterProduct2.CostAp, nextAvatarState.actionPoint); var marketState = new MarketState(nextState.GetState(Addresses.Market)); Assert.Contains(_sellerAvatarAddress, marketState.AvatarAddresses); @@ -693,7 +693,7 @@ public void Register_And_ReRegister() }); var latestAvatarState = latestState.GetAvatarStateV2(_sellerAvatarAddress); - Assert.Equal(_gameConfigState.ActionPointMax - RegisterProduct.CostAp - ReRegisterProduct.CostAp, latestAvatarState.actionPoint); + Assert.Equal(_gameConfigState.ActionPointMax - RegisterProduct2.CostAp - ReRegisterProduct.CostAp, latestAvatarState.actionPoint); var inventoryItem = Assert.Single(latestAvatarState.inventory.Items); Assert.Equal(1, inventoryItem.count); Assert.IsType(inventoryItem.item); @@ -960,7 +960,7 @@ public void HardFork() }, }; //Cancel - var cancelAction = new CancelProductRegistration + var cancelAction = new CancelProductRegistration0 { AvatarAddress = _sellerAvatarAddress, ProductInfos = productInfos, @@ -1057,7 +1057,7 @@ public void HardFork() })); //Buy - var buyAction = new BuyProduct + var buyAction = new BuyProduct2 { AvatarAddress = _buyerAvatarAddress, ProductInfos = productInfos, diff --git a/.Lib9c.Tests/Action/Scenario/Pet/AdditionalOptionRateByFixedValueTest.cs b/.Lib9c.Tests/Action/Scenario/Pet/AdditionalOptionRateByFixedValueTest.cs index 43531f9b23..366f4f8aec 100644 --- a/.Lib9c.Tests/Action/Scenario/Pet/AdditionalOptionRateByFixedValueTest.cs +++ b/.Lib9c.Tests/Action/Scenario/Pet/AdditionalOptionRateByFixedValueTest.cs @@ -117,7 +117,7 @@ int petLevel ); // Do combination without pet - var action = new CombinationEquipment + var action = new CombinationEquipment16 { avatarAddress = _avatarAddr, slotIndex = 0, @@ -156,7 +156,7 @@ int petLevel random ); - var petAction = new CombinationEquipment + var petAction = new CombinationEquipment16 { avatarAddress = _avatarAddr, slotIndex = 1, diff --git a/.Lib9c.Tests/Action/Scenario/Pet/CommonTest.cs b/.Lib9c.Tests/Action/Scenario/Pet/CommonTest.cs index 38cfe804b3..7209d4e657 100644 --- a/.Lib9c.Tests/Action/Scenario/Pet/CommonTest.cs +++ b/.Lib9c.Tests/Action/Scenario/Pet/CommonTest.cs @@ -104,7 +104,7 @@ public void PetCannotBeUsedToTwoSlotsAtTheSameTime() ); // Combination1 - var action1 = new CombinationEquipment + var action1 = new CombinationEquipment16 { avatarAddress = _avatarAddr, slotIndex = 0, @@ -121,7 +121,7 @@ public void PetCannotBeUsedToTwoSlotsAtTheSameTime() }); // Combination2: Raises error - var action2 = new CombinationEquipment + var action2 = new CombinationEquipment16 { avatarAddress = _avatarAddr, slotIndex = 1, diff --git a/.Lib9c.Tests/Action/Scenario/Pet/DiscountMaterialCostCrystalTest.cs b/.Lib9c.Tests/Action/Scenario/Pet/DiscountMaterialCostCrystalTest.cs index 8aa4d0e82a..6c9302a09d 100644 --- a/.Lib9c.Tests/Action/Scenario/Pet/DiscountMaterialCostCrystalTest.cs +++ b/.Lib9c.Tests/Action/Scenario/Pet/DiscountMaterialCostCrystalTest.cs @@ -114,7 +114,7 @@ public void CraftEquipmentTest( ); // Do combination - var action = new CombinationEquipment + var action = new CombinationEquipment16 { avatarAddress = _avatarAddr, slotIndex = 0, diff --git a/.Lib9c.Tests/Action/Scenario/Pet/IncreaseBlockPerHourglassTest.cs b/.Lib9c.Tests/Action/Scenario/Pet/IncreaseBlockPerHourglassTest.cs index b65b4776c0..e519af41b0 100644 --- a/.Lib9c.Tests/Action/Scenario/Pet/IncreaseBlockPerHourglassTest.cs +++ b/.Lib9c.Tests/Action/Scenario/Pet/IncreaseBlockPerHourglassTest.cs @@ -149,7 +149,7 @@ public void RapidCombinationTest_Equipment( ); // Do combination - var action = new CombinationEquipment + var action = new CombinationEquipment16 { avatarAddress = _avatarAddr, slotIndex = 0, @@ -167,7 +167,7 @@ public void RapidCombinationTest_Equipment( }); // Do rapid combination - var rapidAction = new RapidCombination + var rapidAction = new RapidCombination9 { avatarAddress = _avatarAddr, slotIndex = 0, diff --git a/.Lib9c.Tests/Action/Scenario/Pet/ReduceRequiredBlockTest.cs b/.Lib9c.Tests/Action/Scenario/Pet/ReduceRequiredBlockTest.cs index a4913fade7..ff22a793ad 100644 --- a/.Lib9c.Tests/Action/Scenario/Pet/ReduceRequiredBlockTest.cs +++ b/.Lib9c.Tests/Action/Scenario/Pet/ReduceRequiredBlockTest.cs @@ -104,7 +104,7 @@ public void CombinationEquipmentTest( ); // Do Combination - var action = new CombinationEquipment + var action = new CombinationEquipment16 { avatarAddress = _avatarAddr, slotIndex = 0, diff --git a/.Lib9c.Tests/Action/Scenario/RapidCombinationTest.cs b/.Lib9c.Tests/Action/Scenario/RapidCombinationTest.cs index b1799613bd..cd6334b6f9 100644 --- a/.Lib9c.Tests/Action/Scenario/RapidCombinationTest.cs +++ b/.Lib9c.Tests/Action/Scenario/RapidCombinationTest.cs @@ -136,7 +136,7 @@ int expectedHourGlassCount // Do combination action var recipe = recipeList[i]; - var action = new CombinationEquipment + var action = new CombinationEquipment16 { avatarAddress = _avatarAddr, slotIndex = i, @@ -161,7 +161,7 @@ int expectedHourGlassCount // Do RapidCombination for (var i = 0; i < recipeList.Count; i++) { - var action = new RapidCombination + var action = new RapidCombination9 { avatarAddress = _avatarAddr, slotIndex = i, diff --git a/.Lib9c.Tests/Action/Scenario/RuneScenarioTest.cs b/.Lib9c.Tests/Action/Scenario/RuneScenarioTest.cs index 358b25859a..6fd99485c7 100644 --- a/.Lib9c.Tests/Action/Scenario/RuneScenarioTest.cs +++ b/.Lib9c.Tests/Action/Scenario/RuneScenarioTest.cs @@ -91,7 +91,7 @@ public void Craft_And_Equip() var runeSlotStateAddress = RuneSlotState.DeriveAddress(avatarAddress, BattleType.Adventure); Assert.Null(state.GetState(runeSlotStateAddress)); - var has = new HackAndSlash + var has = new HackAndSlash21 { StageId = 1, AvatarAddress = avatarAddress, diff --git a/.Lib9c.Tests/Action/SellCancellationTest.cs b/.Lib9c.Tests/Action/SellCancellationTest.cs index f3d5fbdc1e..6a239f218b 100644 --- a/.Lib9c.Tests/Action/SellCancellationTest.cs +++ b/.Lib9c.Tests/Action/SellCancellationTest.cs @@ -238,7 +238,7 @@ bool fromPreviousAction Signer = _agentAddress, }); - var cancelProductRegistration = new CancelProductRegistration + var cancelProductRegistration = new CancelProductRegistration0 { AvatarAddress = _avatarAddress, ProductInfos = new List diff --git a/.Lib9c.Tests/Extensions/EquipmentExtensionsTest.cs b/.Lib9c.Tests/Extensions/EquipmentExtensionsTest.cs index 0c3c79d618..dec0621092 100644 --- a/.Lib9c.Tests/Extensions/EquipmentExtensionsTest.cs +++ b/.Lib9c.Tests/Extensions/EquipmentExtensionsTest.cs @@ -137,7 +137,7 @@ private Equipment CreateEquipment( if (!(subRecipeRow is null)) { - CombinationEquipment.AddAndUnlockOption( + CombinationEquipment16.AddAndUnlockOption( new AgentState(new PrivateKey().ToAddress()), null, equipment, diff --git a/Lib9c.DevExtensions/Action/CreateOrReplaceAvatar.cs b/Lib9c.DevExtensions/Action/CreateOrReplaceAvatar.cs index cef36cc607..0568b185e4 100644 --- a/Lib9c.DevExtensions/Action/CreateOrReplaceAvatar.cs +++ b/Lib9c.DevExtensions/Action/CreateOrReplaceAvatar.cs @@ -490,7 +490,7 @@ public IAccount Execute( var recipe = recipeSheet.OrderedList! .First(e => e.ResultEquipmentId == equipmentId); var subRecipe = subRecipeSheetV2[recipe.SubRecipeIds[1]]; - CombinationEquipment.AddAndUnlockOption( + CombinationEquipment16.AddAndUnlockOption( agent, null, equipment, diff --git a/Lib9c/Action/AuraSummon.cs b/Lib9c/Action/AuraSummon.cs index 4380f0c2f0..fa1c7324ca 100644 --- a/Lib9c/Action/AuraSummon.cs +++ b/Lib9c/Action/AuraSummon.cs @@ -320,7 +320,7 @@ SkillSheet skillSheet } else { - var skill = CombinationEquipment.GetSkill(optionRow, skillSheet, random); + var skill = CombinationEquipment16.GetSkill(optionRow, skillSheet, random); if (skill is null) continue; equipment.Skills.Add(skill);