public static IEnumerable<object[]> FirstClassChangeParamsData =>
new List<object[]>
{
new object[] { ClassType.Human_Fighter, ClassType.Knight, ClassParamsExpectations.KnightExpectation()},
new object[] { ClassType.Orc_Fighter, ClassType.Orc_Monk, ClassParamsExpectations.OrcMonkExpectation()},
new object[] { ClassType.Orc_Fighter, ClassType.Orc_Raider, ClassParamsExpectations.OrcRaiderExpectation()},
new object[] { ClassType.Orc_Mage, ClassType.Orc_Shaman, ClassParamsExpectations.OrcShamanExpectation()},
new object[] { ClassType.Dwarven_Fighter, ClassType.Scavenger, ClassParamsExpectations.ScavengerExpectation()},
new object[] { ClassType.Dwarven_Fighter, ClassType.Artisan, ClassParamsExpectations.ArtisanExpectation()},
// ...
};
[Theory]
[MemberData(nameof(FirstClassChangeParamsData))]
public void FirstClassChangeParamsCheck(ClassType originalClassType, ClassType classType, ClassParamsExpectations expectedParams)
{
CacheDAdmin admin = new CacheDAdmin("admin");
admin.ConnectToService(ConnectionConfig.LoginServerIP, ConnectionConfig.CacheAdminPort);
Usecases.CacheAdmin.CharUseCases adminUC = new Usecases.CacheAdmin.CharUseCases(admin);
adminUC.DeleteChar("bowTst");
PcInstance player = new PcInstance();
LobbyScenario scenario = new LobbyScenario(player, ConnectionConfig.LoginServerIP, ConnectionConfig.LoginServerPort);
Assert.True(scenario.EnterLobby("test1", "test1"));
Assert.True(scenario.CreateChar("bowTst", originalClassType));
Assert.True(scenario.EnterWorld());
BuilderCommandUseCase builder = new BuilderCommandUseCase(player);
builder.SetLevel(20);
builder.ChangeClass(classType);
player.ConsumeUpdates();
builder.AddAllSkills();
player.ConsumeUpdates();
player.ConsumeStatUpdates();
UserInfoInd info = player.UserInfo;
Assert.Equal(expectedParams.ClassType, info.ClassType);
Assert.Equal(expectedParams.Race, info.Race);
Assert.Equal(expectedParams.Level, info.Level);
Assert.Equal(expectedParams.Accuracy, info.Accuracy);
Assert.Equal(expectedParams.AttackRange, info.AttackRange);
Assert.Equal(expectedParams.AttackSpeed, info.AttackSpeed);
Assert.Equal(expectedParams.AttackSpeedMultiplier, info.AttackSpeedMultiplier, 3);
Assert.Equal(expectedParams.Evasion, info.Evasion);
Assert.Equal(expectedParams.Critical, info.Critical);
Assert.Equal(expectedParams.MoveSpeedMultiplier, info.MoveSpeedMultiplier, 3);
Assert.Equal(expectedParams.InventoryCarringWeight, info.InventoryCarringWeight);
Assert.Equal(expectedParams.MaxWeight, info.MaxWeight);
Assert.Equal(expectedParams.BaseHP, info.BaseHP);
Assert.Equal(expectedParams.BaseMP, info.BaseMP);
Assert.Equal(expectedParams.Mp, info.Mp);
Assert.Equal(expectedParams.Hp, info.Hp);
Assert.Equal(expectedParams.PhysAtk, info.PhysAtk);
Assert.Equal(expectedParams.PhysDef, info.PhysDef);
Assert.Equal(expectedParams.BaseMagAtkSpd, info.BaseMagAtkSpd);
Assert.Equal(expectedParams.BasePhysAtkSpd, info.BasePhysAtkSpd);
Assert.Equal(expectedParams.MagAtk, info.MagAtk);
Assert.Equal(expectedParams.MagDef, info.MagDef);
Assert.Equal(expectedParams.DexStat, info.DexStat);
Assert.Equal(expectedParams.ConStat, info.ConStat);
Assert.Equal(expectedParams.MenStat, info.MenStat);
Assert.Equal(expectedParams.StrStat, info.StrStat);
Assert.Equal(expectedParams.WitStat, info.WitStat);
Assert.Equal(expectedParams.IntStat, info.IntStat);
Assert.Equal(expectedParams.MoveSpeedRun_Flight, info.MoveSpeedRun_Flight);
Assert.Equal(expectedParams.MoveSpeedRun_Floating, info.MoveSpeedRun_Floating);
Assert.Equal(expectedParams.MoveSpeedRun_Ground, info.MoveSpeedRun_Ground);
Assert.Equal(expectedParams.MoveSpeedRun_Underwater, info.MoveSpeedRun_Underwater);
Assert.Equal(expectedParams.MoveSpeedWalk_Flight, info.MoveSpeedWalk_Flight);
Assert.Equal(expectedParams.MoveSpeedWalk_Floating, info.MoveSpeedWalk_Floating);
Assert.Equal(expectedParams.MoveSpeedWalk_Ground, info.MoveSpeedWalk_Ground);
Assert.Equal(expectedParams.MoveSpeedWalk_Underwater, info.MoveSpeedWalk_Underwater);
Assert.True(scenario.LogOut());
player.DisconnectWorld();
}