TVerdict CTestImpNoBDay::doTestStepL() /** * @return - TVerdict code * Override of base class pure virtual */ { SetTestStepResult(EFail); for (TInt i =0; i<2; i++) { INFO_PRINTF2(_L("TEST: %d"), i+1); // test codes TBuf<90> pathVCF(KPathImportNoBDay); OpenBDAYVCFAndImportItemL(pathVCF, i); // Imports vcf // checks if Imported Birthday is NULL if(iBDayFromImport == NULL) { INFO_PRINTF1(_L("Imported Birthday is NULL (correct)")); SetTestStepResult(EPass); } else { INFO_PRINTF1(_L("Imported Birthday is NOT NULL (incorrect)")); SetTestStepResult(EFail); return TestStepResult(); } } return TestStepResult(); }
TVerdict CTestImpBDay::doTestStepL() /** * @return - TVerdict code * Override of base class pure virtual */ { SetTestStepResult(EFail); TInt numberOfCases = 0; while(ETrue) { TBuf<90> config(KImportBDay); TPtrC ptrexpUTC = GetExpectedUTCFromIniL(numberOfCases, config, ETrue); if(ptrexpUTC==KNullDesC) { break; } INFO_PRINTF2(_L("TEST: %d"), numberOfCases+1); iExpectedBDay = FormatDateTime(ptrexpUTC); TBuf<90> pathVCF(KPathImportBDay); OpenBDAYVCFAndImportItemL(pathVCF, numberOfCases); // Imports vcf TDateTime importedDateTime = iBDayFromImport.DateTime(); TDateTime expectedDateTime = iExpectedBDay.DateTime(); // If birthday does not match, test will fail if((importedDateTime.Year() != expectedDateTime.Year()) || (importedDateTime.Month() != expectedDateTime.Month()) || (importedDateTime.Day() != expectedDateTime.Day()) ) { INFO_PRINTF1(_L("Imported Birthday not correct")); SetTestStepResult(EFail); return TestStepResult(); } else { INFO_PRINTF1(_L("Imported Birthday as expected")); SetTestStepResult(EPass); } numberOfCases++; } return TestStepResult(); }