def validSetAndGetSuiteResult():
    tbTestSuite = TBTestSuite(1,'Sample test 1')
    for i in range(3):
        newTest = TBTAFSampleTest()
        tbTestSuite.addTestCase(newTest)

    temp = tbTestSuite.getSuiteResult()
    
    tbtafExecutionStatus = TBTAFExecutionStatus()
    tbtafExecutionStatus.setSuiteResult(temp)
    result = tbtafExecutionStatus.getSuiteResult()
    if result != temp:
        raise Exception('The value returned is not the same that was set')
def validGetCompletionPercentage():
    tbtafExecutionStatus = TBTAFExecutionStatus()
    tbtafExecutionStatus.setTestCasesTotal(10)
    tbtafExecutionStatus.setTestCasesExecuted(3)
    result = tbtafExecutionStatus.getCompletionPercentage()
    if result != 30.00:
        raise Exception('The calculation is wrong')
def invalidGetCompletionPercentage2():
    tbtafExecutionStatus = TBTAFExecutionStatus()
    tbtafExecutionStatus.setTestCasesExecuted(3)
    result = tbtafExecutionStatus.getCompletionPercentage()
def invalidGetCompletionPercentage1():
    tbtafExecutionStatus = TBTAFExecutionStatus()
    tbtafExecutionStatus.setTestCasesTotal(10)
    result = tbtafExecutionStatus.getCompletionPercentage()
def validSetAndGetTestCasesExecuted():
    tbtafExecutionStatus = TBTAFExecutionStatus()
    tbtafExecutionStatus.setTestCasesExecuted(3)
    result = tbtafExecutionStatus.getTestCasesExecuted()
    if result != 3:
        raise Exception('The value returned is not the same that was set')
def validSetAndGetExecutionStatusType():
    tbtafExecutionStatus = TBTAFExecutionStatus()
    tbtafExecutionStatus.setExecutionStatusType(TBTAFExecutionStatusType.COMPLETED)
    result = tbtafExecutionStatus.getExecutionStatusType()
    if result != TBTAFExecutionStatusType.COMPLETED:
        raise Exception('The value returned is not the same that was set')