当前位置: 首页>>代码示例>>C++>>正文


C++ CBaseEntityTA::ValidateEntity方法代码示例

本文整理汇总了C++中CBaseEntityTA::ValidateEntity方法的典型用法代码示例。如果您正苦于以下问题:C++ CBaseEntityTA::ValidateEntity方法的具体用法?C++ CBaseEntityTA::ValidateEntity怎么用?C++ CBaseEntityTA::ValidateEntity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CBaseEntityTA的用法示例。


在下文中一共展示了CBaseEntityTA::ValidateEntity方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ValidateEntity

/******************************************************************************
Function Name  :  ValidateEntity
Input(s)       :  
Output         :  HRESULT
Functionality  :   
Member of      :  CTestSetupEntity
Friend of      :  -
Author(s)      :  Venkatanarayana Makam
Date Created   :  13/04/2011
Modifications  :  
Code Tag       :  CS026
******************************************************************************/
HRESULT CTestSetupEntity::ValidateEntity(CString& omStrResult)
{
    UINT unCount;
    GetSubEntryCount(unCount);
    CString omStrHeaderResult;
    HRESULT hResult = ERR_VALID_SUCCESS;

    if(m_ouTestSetupHeader.ValidateEntity(omStrHeaderResult) == ERR_VALID_ERROR)
    {
        omStrResult += omStrHeaderResult;
        hResult = ERR_VALID_ERROR;
    }

    if(unCount <=0 )
    {
        omStrResult += _T("No TestCases Are Defined\r\n");
        hResult = ERR_VALID_ERROR;
    }
    else
    {
        for(UINT i=0; i<unCount; i++)
        {
            CString omStrTcResult;
            CBaseEntityTA* pTcEntity;
            GetSubEntityObj(i, &pTcEntity);
            if(pTcEntity->ValidateEntity(omStrTcResult) == ERR_VALID_ERROR) 
            {
                hResult = ERR_VALID_ERROR;
            }
            omStrResult += omStrTcResult;
        }
    }
    return hResult;
}
开发者ID:Conti-Meissner,项目名称:busmaster,代码行数:46,代码来源:TestSetupEntity.cpp

示例2: ValidateEntity

/******************************************************************************
Function Name  :  ValidateEntity
Input(s)       :  
Output         :  HRESULT
Functionality  :   
Member of      :  CTestCaseEntity
Friend of      :  -
Author(s)      :  Venkatanarayana Makam
Date Created   :  13/04/2011
Modifications  :  
Code Tag       :  CS028
******************************************************************************/
HRESULT CTestCaseEntity::ValidateEntity(CString& omStrResult)
{
    UINT unTestCaseCount;
    CString omStrTemp;
    GetSubEntryCount(unTestCaseCount);
    
    HRESULT hResult = ERR_VALID_SUCCESS;
    if(unTestCaseCount == 0)
    {
        omStrTemp.Format("\tError: Atleast One Verify Node Should be Defined\r\n");
        hResult = ERR_VALID_ERROR;      //CS028
    }
    else
    {
        BOOL bVerifyEntityFound = FALSE;
        //omStrTemp = "\t";
        for(UINT i = 0; i < unTestCaseCount; i++)
        {
            CString omStrTCResult;
            CBaseEntityTA* pTCSubEntity;
            if(GetSubEntityObj(i, &pTCSubEntity) == S_OK)
            {
                omStrTCResult.Format(_T("Node %d:"), i+1);
                HRESULT hTempResult = pTCSubEntity->ValidateEntity(omStrTCResult);
                if(hTempResult != ERR_VALID_SUCCESS)
                {   
                    omStrTemp += "\t" + omStrTCResult;
                    if(hResult != ERR_VALID_ERROR)
                    {
                        hResult = hTempResult;
                    }
                }
                if(pTCSubEntity->GetEntityType() == VERIFY)
                {
                    bVerifyEntityFound = TRUE;
                }
                
            }
        }
        if(bVerifyEntityFound == FALSE)
        {
            omStrTemp += "\tError: No Verify Entity Found\r\n";
            hResult = ERR_VALID_ERROR;
        }
    }
    if(hResult != ERR_VALID_SUCCESS)
    {
        omStrResult.Format(_T("TestCase %s Result \r\n"), m_ouData.m_omTitle);
        omStrResult += omStrTemp + "\n";
    }
    return hResult;
}
开发者ID:Conti-Meissner,项目名称:busmaster,代码行数:64,代码来源:TestCaseEntity.cpp


注:本文中的CBaseEntityTA::ValidateEntity方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。