本文整理汇总了C++中CBaseEntityTA::bGetEnableStatus方法的典型用法代码示例。如果您正苦于以下问题:C++ CBaseEntityTA::bGetEnableStatus方法的具体用法?C++ CBaseEntityTA::bGetEnableStatus怎么用?C++ CBaseEntityTA::bGetEnableStatus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBaseEntityTA
的用法示例。
在下文中一共展示了CBaseEntityTA::bGetEnableStatus方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: bParseTestSetup
/******************************************************************************
Function Name : bParseTestSetup
Input(s) : INT nIndex
Output : BOOL
Functionality : Loads The
Member of : CTSExecutorChildFrame
Friend of : -
Author(s) : Venkatanarayana Makam
Date Created : 07/04/2011
Modifications :
Code Tag :
******************************************************************************/
BOOL CTSExecutorChildFrame::bParseTestSetup(INT nIndex)
{
BOOL bResult = FALSE;
STestSetupInfo sTSInfo;
if( m_ouTSExecutor.GetTestSetupInfo(nIndex, sTSInfo) == S_OK)
{
HTREEITEM hTSItem = m_odTreeView->InsertTreeItem(m_hParentTreeItem, sTSInfo.m_omstrName, NULL, def_INDEX_TESTSETUPIMAGE,
def_INDEX_TESTSETUPIMAGE, sTSInfo.m_dwID);
m_odTreeView->GetTreeCtrl().SetCheck(hTSItem, sTSInfo.m_bEnable);
for(INT i = 0; i < sTSInfo.m_nTCCount; i++)
{
CBaseEntityTA* pouTCData;
CTestCaseData ouTCData;
if(m_ouTSExecutor.GetTestCaseInfo(sTSInfo.m_dwID, i, &pouTCData) == S_OK)
{
pouTCData->GetEntityData(TEST_CASE, &ouTCData);
HTREEITEM hTCItem = m_odTreeView->InsertTreeItem(hTSItem, ouTCData.m_omTitle, NULL, def_INDEX_TESTCASEIMAGE,
def_INDEX_TESTCASEIMAGE, pouTCData->GetID());
m_odTreeView->GetTreeCtrl().SetCheck(hTCItem, pouTCData->bGetEnableStatus());
}
}
bResult = TRUE;
}
return bResult;
}
示例2: bExecuteTestSetup
/******************************************************************************
Function Name : bExecuteTestSetup
Input(s) : CTestSetupEntity& ouTestSetupEntity
Output : BOOL
Functionality : Executes the TestSetup
Member of : CTSExecutorLIB
Friend of : -
Author(s) : Venkatanarayana Makam
Date Created : 07/04/2011
Modifications :
Code Tag :
******************************************************************************/
BOOL CTSExecutorLIB::bExecuteTestSetup(CTestSetupEntity& ouTestSetupEntity)
{
CBaseEntityTA* pouTestCase;
UINT unTCCount;
//Initialise Result Information
ouTestSetupEntity.GetSubEntryCount(unTCCount);
ouTestSetupEntity.GetHeaderData(m_ouResult.m_ouHeaderInfo);
ouTestSetupEntity.m_ouDataBaseManager.bFillDataStructureFromDatabaseFile(m_ouResult.m_ouHeaderInfo.m_omDatabasePath);
//pfand: Insert hardcoded testcase here
m_ouResult.m_omStrTestSetupFile = ouTestSetupEntity.m_omstrTestSetupTitle;
m_ouResult.m_odTcResultList.RemoveAll();
for(UINT nTCIndex=0; nTCIndex<unTCCount; ++nTCIndex)
{
ouTestSetupEntity.GetSubEntityObj(nTCIndex, &pouTestCase);
if(pouTestCase->bGetEnableStatus() == TRUE)
{
//Start Result Update
CTestCaseData ouTestCaseData;
pouTestCase->GetEntityData(TEST_CASE, &ouTestCaseData);
CResultTc ouTestCaseResult;
ouTestCaseResult.m_omTestCase = ouTestCaseData.m_omTitle;
ouTestCaseResult.m_omTestDescripter = "";
GetLocalTime(&ouTestCaseResult.m_sStartTime);
//Now Execute;
ouTestCaseResult.m_eResult = SUCCESS;
BOOL bResult = bExecuteTestCase(pouTestCase, ouTestCaseResult);
if(bResult == FALSE)
{
//TODO:: ProperHandling Required
ouTestCaseResult.m_eResult = ERRORS;
}
GetLocalTime(&ouTestCaseResult.m_sEndTime);
m_ouResult.m_odTcResultList.AddTail(ouTestCaseResult);
}
}
m_ouResult.GenerateReport();
return TRUE;
}
示例3: GetConfigurationData
HRESULT CTSExecutorLIB::GetConfigurationData(xmlNodePtr pxmlNodePtr)
{
const char* omcVarChar ;
//<Test_Suite_Name />
omcVarChar = m_omstrTestSuiteName.GetBuffer(MAX_PATH);
xmlNodePtr pTSName = xmlNewChild(pxmlNodePtr, NULL, BAD_CAST DEF_TS_NAME, BAD_CAST omcVarChar);
xmlAddChild(pxmlNodePtr, pTSName);
// <IsEnable />
CString csIsEnabled;
csIsEnabled.Format("%d", m_bTestSuiteStatus);
omcVarChar = csIsEnabled;
xmlNodePtr pIsEnabled = xmlNewChild(pxmlNodePtr, NULL, BAD_CAST DEF_IS_ENABLE, BAD_CAST omcVarChar);
xmlAddChild(pxmlNodePtr, pIsEnabled);
INT nFileCount = (INT)m_ouTestSetupEntityList.GetCount();
for(int iCnt = 0; iCnt < nFileCount; iCnt++)
{
//<TEST_SUITE>
xmlNodePtr pTestSuite = xmlNewNode(NULL, BAD_CAST DEF_TEST_SUITE);
xmlAddChild(pxmlNodePtr, pTestSuite);
//<Test_Suite_Name />
POSITION pos = m_ouTestSetupEntityList.FindIndex(iCnt);
CTestSetupEntity& ouTestSetupEntity = m_ouTestSetupEntityList.GetAt(pos);
string omPath, omStrConfigFolder;
char configPath[MAX_PATH];
AfxGetMainWnd()->SendMessage(MSG_GET_CONFIGPATH, (WPARAM)configPath, 0);
CUtilFunctions::nGetBaseFolder(configPath, omStrConfigFolder );
CUtilFunctions::MakeRelativePath(omStrConfigFolder.c_str(), (char*)ouTestSetupEntity.m_omstrCurrentTSFile.GetBuffer(MAX_PATH), omPath);
omcVarChar = omPath.c_str();
xmlNodePtr pFilePath = xmlNewChild(pTestSuite, NULL, BAD_CAST DEF_FILE_PATH, BAD_CAST omcVarChar);
xmlAddChild(pTestSuite, pFilePath);
//<IsEnable />
CString csIsEnabled;
csIsEnabled.Format("%d", ouTestSetupEntity.bGetEnableStatus());
omcVarChar = csIsEnabled;
xmlNodePtr pIsEnabled = xmlNewChild(pTestSuite, NULL, BAD_CAST DEF_IS_ENABLE, BAD_CAST omcVarChar);
xmlAddChild(pTestSuite, pIsEnabled);
//<Testcases_Selected>
xmlNodePtr pTestCasesSel = xmlNewNode(NULL, BAD_CAST DEF_TEST_CASES_SEL);
xmlAddChild(pTestSuite, pTestCasesSel);
// <Index>1</Index>
CString csIndex;
bool bStatus;
UINT unCount;
ouTestSetupEntity.GetSubEntryCount(unCount);
for(UINT j=0; j<unCount; j++)
{
CBaseEntityTA* pTCEntity;
ouTestSetupEntity.GetSubEntityObj(j, &pTCEntity);
bStatus = FALSE;
if(pTCEntity != NULL)
{
bStatus = pTCEntity->bGetEnableStatus();
}
if( bStatus == true )
{
csIndex.Format("%d", j);
omcVarChar = csIndex;
xmlNodePtr pIndex = xmlNewChild(pTestCasesSel, NULL, BAD_CAST DEF_INDEX, BAD_CAST omcVarChar);
xmlAddChild(pTestCasesSel, pIndex);
}
}
}
return true;
}