void KGatewaytest::TestUserLoginPaysysNeedMibaoPaysysNoRespond() // caseID: { int nResult = false; int nRetCode = false; char szTestCaseDscribe[] = "// caseID????:,测试Paysys返回登陆账号密码正确,需要密保验证时,客户端已经输入密保矩阵,但paysys不返回验证结果,Client玩家收到密保密码错误"; KG_RETURN_RESULT Result; KGLogPrintf(KGLOG_INFO, "caseID????:\n"); FillTestUserLoginInfo(KG_USER_MIBAO, ACTION_SUCCESS, AccountUserLoginInfo, PASSPODMODE_ZPMATRIX, ACTION_SUCCESS, false, false, ACTION_FAILED, true); nRetCode = InitTestEnvironment(true, true, true, 1, m_GatewayTestConfig.ForecastConfig.nTestPoint); KGLOG_PROCESS_ERROR(nRetCode); m_GatewayTestConfig.PaysysManagerConfig.nNotRespondSubProtocol = AccountUserPasspodVerify; nRetCode = m_pClientController->FillOperate( 3, onConnectToGateway, onHandShake, onAccountVerify //onMibaoVerify ); KGLOG_PROCESS_ERROR(nRetCode); nRetCode = m_pClientController->Run(); KGLOG_PROCESS_ERROR(nRetCode); Idle(70); nRetCode = m_pPaysys->SetAccountVerifyRespondType(AccountUserPasspodVerifyRet, PASSPODMODE_ZPMATRIX, ACTION_FAILED); KGLOG_PROCESS_ERROR(nRetCode); nRetCode = m_pClientController->AddOperateToClient(0, 1, onMibaoVerify); KGLOG_PROCESS_ERROR(nRetCode); Idle(70); nRetCode = m_pClientController->GetReturnResult(0, &Result); KGLOG_PROCESS_ERROR(nRetCode); nRetCode = memcmp(&Result, &(m_GatewayTestConfig.ForecastConfig), sizeof(Result)); KGLOG_PROCESS_ERROR(!nRetCode); nResult = true; Exit0: UnInitTestEnvironment(); #ifdef WIN32 { KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nResult); } #else { //InsertInfo(CASEPURPOSE, (szTestCaseDscribe)); //InsertInfo(PRECONDITION, ("")); CPPUNIT_ASSERT(nResult); } #endif }
void KMathFunctionTest::KMathTest_6731() { int nRetCode = false; char szTestCaseDscribe[] = "与坐标系(0, 0)的方向 检查第三象限内非整数角度(舍去)的数值正确性 "; KG_CASE_INFO(szTestCaseDscribe, ""); nRetCode = TestGetDirection(175.3, 175) ; KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nRetCode); }
void KMathFunctionTest::KMathTest_6717() { int nRetCode = false; char szTestCaseDscribe[] = "正弦 检查[256, 511]间各个角度的正弦值正确 "; KG_CASE_INFO(szTestCaseDscribe, ""); nRetCode = TestSinInRange(256, 511); KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nRetCode); }
void KMathFunctionTest::KMathTest_6714() { int nRetCode = false; char szTestCaseDscribe[] = "两点方向(模板) 第四象限内两点方向正确 "; KG_CASE_INFO(szTestCaseDscribe, ""); nRetCode = TestGetDirection(1, -2, 3, -4) ; KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nRetCode); }
void KMathFunctionTest::KMathTest_6703() { int nRetCode = false; char szTestCaseDscribe[] = "与坐标系(0, 0)的方向 计算坐标原点的方向 "; KG_CASE_INFO(szTestCaseDscribe, ""); nRetCode = g_GetDirection(0, 0) ; KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nRetCode == 0); }
void KMathFunctionTest::KMathTest_6702() { int nRetCode = false; char szTestCaseDscribe[] = "与坐标系(0, 0)的方向 检查[0, 255]间各个角度的数值正确性 "; KG_CASE_INFO(szTestCaseDscribe, ""); nRetCode = TestGetDirectionInRange(0, 255); KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nRetCode); }
void KMathFunctionTest::KMathTest_6701() { int nRetCode = false; char szTestCaseDscribe[] = "两点间距离的平方(根据xy平面距离平方和z坐标) 三维空间中同一点的距离 "; KG_CASE_INFO(szTestCaseDscribe, ""); nRetCode = g_GetDistance2(2, 5, 2, 5); KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nRetCode == 0); }
void KMathFunctionTest::KMathTest_6697() { int nRetCode = false; char szTestCaseDscribe[] = "两点间距离的平方(根据xy平面距离平方和z坐标) xy平面距离为正整数,z坐标不同的两点距离 "; KG_CASE_INFO(szTestCaseDscribe, ""); nRetCode = g_GetDistance3(10, 5, -5); KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nRetCode == 110); }
void KMathFunctionTest::KMathTest_6698() { int nRetCode = false; char szTestCaseDscribe[] = "两点间距离的平方(根据xy平面距离平方和z坐标) xy平面距离为0,z方向距离非0 "; KG_CASE_INFO(szTestCaseDscribe, ""); nRetCode = g_GetDistance3(0, 10, 0); KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nRetCode == 100); }
void KMathFunctionTest::KMathTest_6696() { int nRetCode = false; char szTestCaseDscribe[] = "两点间距离的平方(根据坐标) 三维空间同一坐标点的距离 "; KG_CASE_INFO(szTestCaseDscribe, ""); nRetCode = g_GetDistance3(10, -20, 50, 10, -20, 50); KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nRetCode == 0); }
void KMathFunctionTest::KMathTest_6695() { int nRetCode = false; char szTestCaseDscribe[] = "两点间距离的平方(根据坐标) 三维空间任意一点与坐标系原点的距离 "; KG_CASE_INFO(szTestCaseDscribe, ""); nRetCode = g_GetDistance3(0, 0, 0, -5, -6, -7); KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nRetCode == 110); }
void KMathFunctionTest::KMathTest_6694() { int nRetCode = false; char szTestCaseDscribe[] = "两点间距离的平方(根据坐标) 三维空间任意两个坐标点距离的平方 "; KG_CASE_INFO(szTestCaseDscribe, ""); nRetCode = g_GetDistance3(10, 20, -30, -10, -20, 10); KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nRetCode == 3600); }
void KMathFunctionTest::KMathTest_6734() { int nRetCode = false; char szTestCaseDscribe[] = "与坐标系(0, 0)的方向 检查第四象限内非整数角度(五入)的数值正确性 "; KG_CASE_INFO(szTestCaseDscribe, ""); nRetCode = TestGetDirection(205.8, 206) ; KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nRetCode); }
void KMathFunctionTest::KMathTest_6704() { int nRetCode = false; char szTestCaseDscribe[] = "与坐标系(0, 0)的方向 x、y达到上限 "; KG_CASE_INFO(szTestCaseDscribe, ""); nRetCode = g_GetDirection(2147483647, 2147483647) ; KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nRetCode == 32); }
void KGT_GetNextSectionTest::TestGetNextSection_11() { int nResult = false; int nRetCode = false; IIniFile *piIniFile = NULL; char *szArgv[] = { "KG_GoddessD.exe" }; int nArgc = sizeof(szArgv) / sizeof(szArgv[0]); char *pszSection = "Version"; char szNextSection[IIniFile::INI_MAX_SUPPORT_SECTION_AND_KEY_SIZE]; szNextSection[0] = '\0'; KG_CASE_INFO("非空值下一个section", "KG_Ini_SectionMap没有记录"); piIniFile = g_OpenIniFileFromArguments(nArgc, szArgv); KG_PROCESS_ERROR(piIniFile); nRetCode = piIniFile->GetNextSection(pszSection, szNextSection); KG_PROCESS_ERROR(!nRetCode); szNextSection[sizeof(szNextSection) - 1] = '\0'; KG_PROCESS_ERROR(szNextSection[0] == '\0'); nResult = true; Exit0: KG_COM_RELEASE(piIniFile); CPPUNIT_ASSERT(nResult); }
void KGT_GetNextSectionTest::TestGetNextSection_06() { int nResult = false; int nRetCode = false; IIniFile *piIniFile = NULL; char *szArgv[] = { "KG_GoddessD.exe", "--AVersion.version=2", "--BDatabase.user=root", "--CNameServer.user=root", "--DLogServer.user=root" }; int nArgc = sizeof(szArgv) / sizeof(szArgv[0]); char *pszSection = "EGoddessServer"; char szNextSection[IIniFile::INI_MAX_SUPPORT_SECTION_AND_KEY_SIZE]; szNextSection[0] = '\0'; KG_CASE_INFO("不存在的记录的下一个section", "KG_Ini_SectionMap有多条记录"); piIniFile = g_OpenIniFileFromArguments(nArgc, szArgv); KG_PROCESS_ERROR(piIniFile); nRetCode = piIniFile->GetNextSection(pszSection, szNextSection); KG_PROCESS_ERROR(!nRetCode); szNextSection[sizeof(szNextSection) - 1] = '\0'; KG_PROCESS_ERROR(szNextSection[0] == '\0'); //szNextSection保持不变 nResult = true; Exit0: KG_COM_RELEASE(piIniFile); CPPUNIT_ASSERT(nResult); }
void KGT_g_OpenIniFileFromArgumentsTest::Test_g_OpenFileFromArguments_09() { int nResult = false; int nRetCode = false; IIniFile *piIniFile = NULL; char *szArgv[] = { "KG_GoddessD.exe", "--Database.password="******"value的长度为0", ""); piIniFile = g_OpenIniFileFromArguments(nArgc, szArgv); KG_PROCESS_ERROR(piIniFile); nRetCode = piIniFile->GetSectionCount(); KG_PROCESS_ERROR(nRetCode == 1); nRetCode = piIniFile->GetString("Database", "password", "root", szRetValue, sizeof(szRetValue) / sizeof(szRetValue[0])); KG_PROCESS_ERROR(nRetCode); KG_PROCESS_ERROR(szRetValue[0] == '\0'); nResult = true; Exit0: KG_COM_RELEASE(piIniFile); CPPUNIT_ASSERT(nResult); }
void KGatewaytest::TestUserLoginPaysysNotRespondAndUserOnLine() // caseID:6660 { int nResult = false; int nRetCode = false; char szTestCaseDscribe[] = "// caseID:6660,测试Paysys正常登陆但不返回验证结果,GameCenter返回用户在线时,Client玩家断线,Paysys收到登出信息"; int HadRevUserLoginOut = false; unsigned nLoopTimes = 100; KGLogPrintf(KGLOG_INFO, "caseID:6660\n"); FillTestUserLoginInfo(KG_USER_LOGIN, E_ACCOUNT_OR_PASSWORD, AccountUserLoginInfo, PASSPODMODE_UNBIND, ACTION_SUCCESS, true, true, USER_ACCOUNT_LOCKED, false); m_GatewayTestConfig.PaysysManagerConfig.nNotRespondProtocol = 62; // B2P_IB_PLAYER_IDENTITY_VERIFY = 62 nRetCode = InitTestEnvironment(true, true, true, 1, m_GatewayTestConfig.ForecastConfig.nTestPoint); KGLOG_PROCESS_ERROR(nRetCode); nRetCode = m_pClientController->FillOperate( 4, onConnectToGateway, onHandShake, onAccountVerify, onDisConnect ); KGLOG_PROCESS_ERROR(nRetCode); nRetCode = m_pClientController->Run(); KGLOG_PROCESS_ERROR(nRetCode); while(true) { KGThread_Sleep(100); nRetCode = m_pPaysys->HadRevUserLoginOut("0", &HadRevUserLoginOut); KGLOG_PROCESS_ERROR(nRetCode); KG_PROCESS_SUCCESS(!HadRevUserLoginOut); nLoopTimes--; KG_PROCESS_ERROR(nLoopTimes); } Exit1: nResult = true; Exit0: UnInitTestEnvironment(); #ifdef WIN32 { KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nResult); } #else { //InsertInfo(CASEPURPOSE, (szTestCaseDscribe)); //InsertInfo(PRECONDITION, ("")); CPPUNIT_ASSERT(nResult); } #endif }
void KMathFunctionTest::KMathTest_6721() { int nRetCode = false; char szTestCaseDscribe[] = "距离是否在指定数值内 两点间距离超出int上限"; nRetCode = g_InRange(0, 0, 0, 2147483647, 2147483647, 2147483647, 1000); KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nRetCode); }
void KMathFunctionTest::KMathTest_6725() { int nRetCode = false; char szTestCaseDscribe[] = "距离是否在指定范围内 两点间距离等于范围的上限"; nRetCode = g_InRange(0, 0, 0, 3, 4, 0, 1, 5); KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nRetCode == irrInRange); }
void KMathFunctionTest::KMathTest_6722() { int nRetCode = false; char szTestCaseDscribe[] = "距离是否在指定范围内 两点间距离小于范围的下限"; nRetCode = g_InRange(0, 0, 0, 1, 1, 1, 5, 10); KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nRetCode == irrTooClose); }
void KMathFunctionTest::KMathTest_6720() { int nRetCode = false; char szTestCaseDscribe[] = "距离是否在指定数值内 两点间距离等于指定数值"; nRetCode = g_InRange(0, 0, 0, 3, 4, 0, 5); KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nRetCode); }
void KMathFunctionTest::KMathTest_6726() { int nRetCode = false; char szTestCaseDscribe[] = "距离是否在指定范围内 两点间距离大于范围的上限"; nRetCode = g_InRange(0, 0, 0, 5, 5, 5, 1, 4); KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nRetCode == irrTooFar); }
void KGatewaytest::TestUserLoginPaysysNeedTokenSucceed() // caseID:24735 { int nResult = false; int nRetCode = false; char szTestCaseDscribe[] = "// caseID:24735:,测试Paysys正常登陆,GameCenter返回Client玩家不在线,玩家设置了令牌密保,输入令牌密码正确,玩家收到密码正确提示"; KG_RETURN_RESULT Result; KGLogPrintf(KGLOG_INFO, "caseID:24735\n"); FillTestUserLoginInfo(KG_USER_MIBAO, ACTION_SUCCESS, AccountUserLoginInfo, PASSPODMODE_ZPTOKEN, ACTION_SUCCESS, false, false, ACTION_SUCCESS, true); nRetCode = InitTestEnvironment(true, true, true, 1, m_GatewayTestConfig.ForecastConfig.nTestPoint); KGLOG_PROCESS_ERROR(nRetCode); nRetCode = m_pClientController->FillOperate( 3, onConnectToGateway, onHandShake, onAccountVerify //onMibaoVerify ); KGLOG_PROCESS_ERROR(nRetCode); nRetCode = m_pClientController->Run(); KGLOG_PROCESS_ERROR(nRetCode); Idle(70); //nRetCode = m_pPaysys->SetAccountVerifyRespondType(AccountUserPasspodVerifyRet, PASSPODMODE_ZPTOKEN, ACTION_SUCCESS); //KGLOG_PROCESS_ERROR(nRetCode); nRetCode = m_pClientController->AddOperateToClient(0, 1, onMibaoVerify); KGLOG_PROCESS_ERROR(nRetCode); Idle(70); nRetCode = m_pClientController->GetReturnResult(0, &Result); KGLOG_PROCESS_ERROR(nRetCode); nRetCode = memcmp(&Result, &(m_GatewayTestConfig.ForecastConfig), sizeof(Result)); KGLOG_PROCESS_ERROR(!nRetCode); nResult = true; Exit0: UnInitTestEnvironment(); #ifdef WIN32 { KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nResult); } #else { //InsertInfo(CASEPURPOSE, (szTestCaseDscribe)); //InsertInfo(PRECONDITION, ("")); CPPUNIT_ASSERT(nResult); } #endif }
void KGatewaytest::TestUserLoginPaysysNeedMibaoClientDisConnectedReConnect() // caseID:24738 { int nResult = false; int nRetCode = false; char szTestCaseDscribe[] = "// caseID:24738,测试Paysys正常登陆,GameCenter返回Client玩家不在线,玩家设置了密保卡,但玩家不输入密保密码就断线,重登"; int nAccountLockedState = false; KGLogPrintf(KGLOG_INFO, "caseID:24738\n"); FillTestUserLoginInfo(KG_USER_MIBAO, ACTION_SUCCESS, AccountUserLoginInfo, PASSPODMODE_ZPMATRIX, ACTION_SUCCESS, false, false, ACTION_SUCCESS, true); nRetCode = InitTestEnvironment(true, true, true, 1, m_GatewayTestConfig.ForecastConfig.nTestPoint); KGLOG_PROCESS_ERROR(nRetCode); nRetCode = m_pClientController->FillOperate( 3, onConnectToGateway, onHandShake, onAccountVerify //onDisConnect ); KGLOG_PROCESS_ERROR(nRetCode); nRetCode = m_pClientController->Run(); KGLOG_PROCESS_ERROR(nRetCode); Idle(70); //nRetCode = m_pPaysys->SetAccountVerifyRespondType(AccountUserPasspodVerifyRet, PASSPODMODE_ZPMATRIX, ACTION_SUCCESS); //KGLOG_PROCESS_ERROR(nRetCode); Idle(70); nRetCode = m_pClientController->AddOperateToClient(0, 4, onDisConnect, onConnectToGateway, onHandShake,onAccountVerify); KGLOG_PROCESS_ERROR(nRetCode); Idle(70); nRetCode = m_pClientController->CheckTheAccountLockedOrNot(0, &nAccountLockedState); KGLOG_PROCESS_ERROR(nRetCode); KGLOG_PROCESS_ERROR(!nAccountLockedState); nResult = true; Exit0: UnInitTestEnvironment(); #ifdef WIN32 { KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nResult); } #else { //InsertInfo(CASEPURPOSE, (szTestCaseDscribe)); //InsertInfo(PRECONDITION, ("")); CPPUNIT_ASSERT(nResult); } #endif }
void KMathFunctionTest::KMathTest_6719() { int nRetCode = false; char szTestCaseDscribe[] = "距离是否在指定数值内 两点间距离大于指定数值"; nRetCode = g_InRange(1, 1, 1, 2, 2, 2, 1); KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(!nRetCode); }
void KGatewaytest::TestUserLoginPaysysNeedTokenClientDisConnectedReConnectPaysysNoRespond() // caseID:24740 { int nResult = false; int nRetCode = false; char szTestCaseDscribe[] = "// caseID:24740,测试Paysys正常登陆,GameCenter返回Client玩家不在线,玩家设置了令牌密保,但玩家输入密保密码,但paysys不返回验证结果,玩家断线重登"; int nAccountLockedState = false; KGLogPrintf(KGLOG_INFO, "caseID:24740\n"); FillTestUserLoginInfo(KG_USER_MIBAO, ACTION_SUCCESS, AccountUserLoginInfo, PASSPODMODE_ZPTOKEN, ACTION_SUCCESS, false, false, ACTION_SUCCESS, true); nRetCode = InitTestEnvironment(true, true, true, 1, m_GatewayTestConfig.ForecastConfig.nTestPoint); KGLOG_PROCESS_ERROR(nRetCode); nRetCode = m_pClientController->FillOperate( 3, onConnectToGateway, onHandShake, onAccountVerify //onMibaoVerify ); KGLOG_PROCESS_ERROR(nRetCode); nRetCode = m_pClientController->Run(); KGLOG_PROCESS_ERROR(nRetCode); Idle(70); nRetCode = m_pPaysys->SetNotHandleProtocol(74);//B2P_PLAYER_PASSPOD_VERIFY = 74 KGLOG_PROCESS_ERROR(nRetCode); nRetCode = m_pClientController->AddOperateToClient(0, 5, onMibaoVerify, onDisConnect, onConnectToGateway, onHandShake, onAccountVerify); KGLOG_PROCESS_ERROR(nRetCode); Idle(70); nRetCode = m_pClientController->CheckTheAccountLockedOrNot(0, &nAccountLockedState); KGLOG_PROCESS_ERROR(nRetCode); KGLOG_PROCESS_ERROR(!nAccountLockedState); nResult = true; Exit0: UnInitTestEnvironment(); #ifdef WIN32 { KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nResult); } #else { //InsertInfo(CASEPURPOSE, (szTestCaseDscribe)); //InsertInfo(PRECONDITION, ("")); CPPUNIT_ASSERT(nResult); } #endif }
void KGatewaytest::TestUserLoginPaysysNotRespondUserReLogin() // caseID:6659 { int nResult = false; int nRetCode = false; char szTestCaseDscribe[] = "// caseID:6659,测试Paysys但不返回用户验证结果时,Client玩家断线,重登,Client玩家没有收到锁号信息(表示没被Gateway锁号)"; int nAccountLockedState = false; KGLogPrintf(KGLOG_INFO, "caseID:6659\n"); FillTestUserLoginInfo(KG_USER_LOGIN, E_ACCOUNT_OR_PASSWORD, AccountUserLoginInfo, PASSPODMODE_UNBIND, ACTION_SUCCESS, false, true, USER_ACCOUNT_LOCKED, false); m_GatewayTestConfig.PaysysManagerConfig.nNotRespondProtocol = 62; // B2P_IB_PLAYER_IDENTITY_VERIFY = 62 nRetCode = InitTestEnvironment(true, true, true, 1, m_GatewayTestConfig.ForecastConfig.nTestPoint); KGLOG_PROCESS_ERROR(nRetCode); nRetCode = m_pClientController->FillOperate( 7, onConnectToGateway, onHandShake, onAccountVerify, onDisConnect, onConnectToGateway, onHandShake, onAccountVerify ); KGLOG_PROCESS_ERROR(nRetCode); nRetCode = m_pClientController->Run(); KGLOG_PROCESS_ERROR(nRetCode); nRetCode = m_pClientController->CheckTheAccountLockedOrNot(0, &nAccountLockedState); KGLOG_PROCESS_ERROR(nRetCode); KGLOG_PROCESS_ERROR(!nAccountLockedState); nResult = true; Exit0: UnInitTestEnvironment(); #ifdef WIN32 { KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nResult); } #else { //InsertInfo(CASEPURPOSE, (szTestCaseDscribe)); //InsertInfo(PRECONDITION, ("")); CPPUNIT_ASSERT(nResult); } #endif }
void KGatewaytest::TestUserLoginGatewayLockTheAccount() // caseID:5126 { int nResult = false; int nRetCode = false; char szTestCaseDscribe[] = "// caseID:5126,账号登陆,Paysys验证通过,但该帐户在另外的地方正在登陆,Client玩家收到账号已锁定"; KG_RETURN_RESULT Result; KGLogPrintf(KGLOG_INFO, "caseID:5126\n"); FillTestUserLoginInfo(KG_USER_LOGIN, ACTION_SUCCESS, AccountUserLoginInfo, PASSPODMODE_UNBIND, ACTION_SUCCESS, false, true, USER_ACCOUNT_LOCKED, false); nRetCode = InitTestEnvironment(true, true, true, 2, m_GatewayTestConfig.ForecastConfig.nTestPoint); KGLOG_PROCESS_ERROR(nRetCode); nRetCode = m_pClientController->ModifyClientUserName(1,"0"); KGLOG_PROCESS_ERROR(nRetCode); nRetCode = m_pClientController->FillOperate( 3, onConnectToGateway, onHandShake, onAccountVerify ); KGLOG_PROCESS_ERROR(nRetCode); nRetCode = m_pClientController->Run(); KGLOG_PROCESS_ERROR(nRetCode); nRetCode = m_pClientController->GetReturnResult(1, &Result); KGLOG_PROCESS_ERROR(nRetCode); nRetCode = memcmp(&Result, &(m_GatewayTestConfig.ForecastConfig), sizeof(Result)); KGLOG_PROCESS_ERROR(!nRetCode); nResult = true; Exit0: UnInitTestEnvironment(); #ifdef WIN32 { KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nResult); } #else { //InsertInfo(CASEPURPOSE, (szTestCaseDscribe)); //InsertInfo(PRECONDITION, ("")); CPPUNIT_ASSERT(nResult); } #endif }
void KGatewaytest::TestUserLoginCGRetUserOnlineUserReLogin() // caseID:6664 { int nResult = false; int nRetCode = false; char szTestCaseDscribe[] = "// caseID:6664, 测试Paysys正常登陆时,GameCenter返回Client玩家在线时,Client玩家端断线之后重登,Client玩家没有收到锁号信息(表示没被Gateway锁号)"; int nAccountLockedState = false; KGLogPrintf(KGLOG_INFO, "caseID:6664\n"); FillTestUserLoginInfo(KG_USER_LOGIN, ACTION_SUCCESS, AccountUserLoginInfo, PASSPODMODE_UNBIND, ACTION_SUCCESS, false, true, USER_ACCOUNT_LOCKED, false); nRetCode = InitTestEnvironment(true, true, true, 1, m_GatewayTestConfig.ForecastConfig.nTestPoint); KGLOG_PROCESS_ERROR(nRetCode); nRetCode = m_pClientController->FillOperate( 7, onConnectToGateway, onHandShake, onAccountVerify, onDisConnect, onConnectToGateway, onHandShake, onAccountVerify ); KGLOG_PROCESS_ERROR(nRetCode); nRetCode = m_pClientController->Run(); KGLOG_PROCESS_ERROR(nRetCode); nRetCode = m_pClientController->CheckTheAccountLockedOrNot(0, &nAccountLockedState); KGLOG_PROCESS_ERROR(nRetCode); KGLOG_PROCESS_ERROR(!nAccountLockedState); nResult = true; Exit0: UnInitTestEnvironment(); #ifdef WIN32 { KG_CASE_INFO(szTestCaseDscribe, ""); KG_CPPUNIT_ASSERT(nResult); } #else { //InsertInfo(CASEPURPOSE, (szTestCaseDscribe)); //InsertInfo(PRECONDITION, ("")); CPPUNIT_ASSERT(nResult); } #endif }