LOCAL_C void doMainL() { InitL(); doTest(); test.Getch(); UninitL(); }
TInt CSendUIAPITest::MsgDataSetSubjectL( TPtrC& aSubject ) { // Print to UI _LIT( KSendUIAPITest, "SendUIAPITest" ); _LIT( KMsgDataSetSubjectL, "In MsgDataSetSubjectL" ); TestModuleIf().Printf( 0, KSendUIAPITest, KMsgDataSetSubjectL ); // Print to log file iLog->Log( KMsgDataSetSubjectL); //Create the instance of CMessageData CMessageData* messagedata = InitL(); //Set the subject TRAPD(err,messagedata->SetSubjectL(&aSubject)); if(err == KErrNone) { return KErrNone; } else { return err; } }
void Header_QuotedPrintable_Parameter::InitL(const OpStringC8 &p_name, const OpStringC16 &p_value, const OpStringC8 &charset, Header_Encoding encoding, BOOL quote_if_not_encoded) { OpString8 p_value2; ANCHOR(OpString8, p_value2); SetToEncodingL(&p_value2, (charset.HasContent() && charset.CompareI("utf-16") != 0 ? charset.CStr() : "utf-8"), p_value.CStr()); InitL(p_name, p_value2, charset, encoding, quote_if_not_encoded); }
LOCAL_C void doMainL() { test.Start(_L("Test - ConnectAndSyncAfterDisconnect")); InitL(); testUtils->TestStart(1); TestConnectAndSyncAfterDisconnectL(); testUtils->TestFinish(1); testUtils->TestHarnessCompleted(); Closedown(); }
LOCAL_C void doMainL() { InitL(); testUtils->iServerEntry->SetEntry(smtpService); // Set the Setting to use Secure Sockets & Run the Tests _LIT(KSecurityOn, "------Set Security On------"); testUtils->WriteComment(KSecurityOn); RunAllTestsL(); // End of the Tests ClosedownL(); }
void doTestsL() { InitL(); //Qualified: no leavescan error TestMessagePreCreateL(); //Qualified: no leavescan error TestMessageCreatedL(); //Qualified: no leavescan error TestMessageDeletedL(); //Qualified: no leavescan error TestMessageAddingAttachmentL(); //Qualified: no leavescan error TestMessageStartSendingL(); //Qualified: no leavescan error TestMessageDuringSendingL(); //Qualified: no leavescan error TestMessageSentL(); //Qualified: no leavescan error CleanupL(); //Qualified: no leavescan error }
LOCAL_C void doMainL() { test.Start(_L("Unable to enquire email entry structure ")); InitL(); testUtils->TestStart(1); TestPopulateL(); testUtils->TestFinish(1); testUtils->TestHarnessCompleted(); Closedown(); }
LOCAL_C void doMainL() { InitL(); test.Printf(_L("\nPerforming Tests\n")); CreateMessageL(); testUtils->InstantiateSmtpClientMtmL(); testUtils->TestStart(testNo++); AddAttachmentSpeedTestL(100); testUtils->TestFinish(testNo-1); testUtils->TestHarnessCompleted(); Closedown(); }
LOCAL_C void doMainL() { InitL(); test.Printf(_L("\nPerforming Tests\n")); testUtils->iMsvEntry->SetEntryL(smtpService); CTestTimer* timer = CTestTimer::NewL(); timer->After(5000000); CActiveScheduler::Start(); delete timer; // store service as default service CEmailAccounts* accounts = CEmailAccounts::NewLC(); TSmtpAccount smtpAccountId; accounts->GetSmtpAccountL(smtpService, smtpAccountId); accounts->SetDefaultSmtpAccountL(smtpAccountId); CleanupStack::PopAndDestroy(accounts); OverwriteSmtpSettingsL(EFalse); CreateMessageL(); // Create a message that will request a receipt OverwriteSmtpSettingsL(ETrue); CreateMessageL(); testUtils->InstantiateSmtpClientMtmL(); timer = CTestTimer::NewL(); timer->After(5000000); CActiveScheduler::Start(); delete timer; testUtils->TestStart(testNo++); TestSendingMessagesL(); testUtils->TestFinish(testNo-1); testUtils->TestStart(testNo++); TestCapabilityL(); testUtils->TestFinish(testNo-1); testUtils->TestHarnessCompleted(); Closedown(); }
void doTestsL() { InitL(); // Qualified: no leavescan error theUtils->Start(_L("Message Add Attachments using RFile")); TestMessageAddAttachmentL(EFalse, KNullDesC8); // Qualified: no leavescan error theUtils->Start(_L("Message Add Attachments using filename")); TestMessageAddAttachmentL(ETrue, KNullDesC8); // Qualified: no leavescan error theUtils->Start(_L("Message Add Attachments using RFile with mime type")); TestMessageAddAttachmentL(EFalse, KMimeType); // Qualified: no leavescan error theUtils->Start(_L("Message Add Attachments using filename with mime type")); TestMessageAddAttachmentL(ETrue, KMimeType); // Qualified: no leavescan error theUtils->Start(_L("Message Add Linked Attachments")); TestMessageAddLinkedAttachmentL(KNullDesC8); // Qualified: no leavescan error theUtils->Start(_L("Message Add Linked Attachments with mime type")); TestMessageAddLinkedAttachmentL(KMimeType); // Qualified: no leavescan error theUtils->Start(_L("Message Create Attachments")); TestMessageCreateAttachmentL(KNullDesC8); // Qualified: no leavescan error theUtils->Start(_L("Message Create Attachments with mime type")); TestMessageCreateAttachmentL(KMimeType); // Qualified: no leavescan error // Charset testing theUtils->Start(_L("Message Add Attachments using RFile with mime type/charset")); TestMessageAddAttachmentL(EFalse, KMimeType, KTestCharset); // Qualified: no leavescan error theUtils->Start(_L("Message Add Attachments using filename with mime type/charset")); TestMessageAddAttachmentL(ETrue, KMimeType, KTestCharset); // Qualified: no leavescan error theUtils->Start(_L("Message Add Linked Attachments with mime type/charset")); TestMessageAddLinkedAttachmentL(KMimeType, KTestCharset); // Qualified: no leavescan error theUtils->Start(_L("Message Create Attachments with mime type/charset")); TestMessageCreateAttachmentL(KMimeType, KTestCharset); // Qualified: no leavescan error CleanupL(); // Qualified: no leavescan error }
LOCAL_C void doMainL() { gTest.Start(KTestTitle); InitL(); scheduler = new (ELeave) CActiveScheduler; CleanupStack::PushL(scheduler); CActiveScheduler::Install( scheduler ); __UHEAP_MARK; myTester = CGmxmlFailure::NewLC(); CActiveScheduler::Start(); log->AppendComment(_L8("Completed tests. No panic")); log->AppendComment(_L8("Test PASSED")); log->AppendComment(_L8("Test 1 OK")); log->AppendComment(_L8("Test 2 Starting")); log->AppendComment(_L8("Performing tests on opening existing file")); myTester->LoadXmlFile(KExistingFilePath); log->AppendComment(_L8("Completed checking of opening existing file")); CActiveScheduler::Start(); log->AppendComment(_L8("Completed tests. No panic")); log->AppendComment(_L8("Test PASSED")); log->AppendComment(_L8("Test 2 OK")); log->AppendComment(_L8("Test 3 Starting")); log->AppendComment(_L8("Performing tests on locked file")); myTester->LockXmlFile(); log->AppendComment(_L8("Completed checking of opening a locked file")); CActiveScheduler::Start(); log->AppendComment(_L8("Completed tests. No panic")); log->AppendComment(_L8("Test PASSED")); log->AppendComment(_L8("Test 3 OK")); CleanupStack::PopAndDestroy(myTester); // myTester __UHEAP_MARKEND; log->AppendComment(_L8("No memory leak in XMLParser")); log->AppendComment(_L8("T_GMXMLFAILURE Tests Complete")); log->AppendComment(_L8("Tests Completed")); CleanupStack::PopAndDestroy(2); // scheduler, log gTest.End(); gTest.Close(); }
void doTestsL() { InitL(); //Qualified: no leavescan error TestSendMessageCancelL(); //Qualified: no leavescan error TestSendMessageConfirmedCancelL(); //Qualified: no leavescan error TestAddAttachmentCancelL(EByName); //Qualified: no leavescan error TestAddAttachmentCancelL(EByNameWithMimeType); //Qualified: no leavescan error TestAddAttachmentCancelL(EByFile); //Qualified: no leavescan error TestAddAttachmentCancelL(EByFileWithMimeType); //Qualified: no leavescan error TestAddAttachmentCancelL(ELinked); //Qualified: no leavescan error TestAddAttachmentCancelL(ELinkedWithMimeType); //Qualified: no leavescan error TestSendMessageAndSessionCloseL(); //Qualified: no leavescan error TestAddAttachmentAndSessionCloseL(EByName); //Qualified: no leavescan error TestAddAttachmentAndSessionCloseL(EByNameWithMimeType); //Qualified: no leavescan error TestAddAttachmentAndSessionCloseL(EByFile); //Qualified: no leavescan error TestAddAttachmentAndSessionCloseL(EByFileWithMimeType); //Qualified: no leavescan error TestAddAttachmentAndSessionCloseL(ELinked); //Qualified: no leavescan error TestAddAttachmentAndSessionCloseL(ELinkedWithMimeType); //Qualified: no leavescan error CleanupL(); //Qualified: no leavescan error }
TInt CSendUIAPITest::MsgDataCompSubjectL( TPtrC& aSubject ) { // Print to UI _LIT( KSendUIAPITest, "SendUIAPITest" ); _LIT( KMsgDataCompSubjectL, "In MsgDataCompSubjectL" ); TestModuleIf().Printf( 0, KSendUIAPITest, KMsgDataCompSubjectL ); // Print to log file iLog->Log( KMsgDataCompSubjectL); //Create the instance of CMessageData CMessageData* messagedata = InitL(); //Get the subject from message data TPtrC msgdatasubject = messagedata->Subject(); //Compare the two subjects if(msgdatasubject == aSubject) { return KErrNone; } else { return KErrGeneral; } }
LOCAL_C void doMainL() { InitL(); TInt globalError = KErrNone; testUtils->FileSession().SetSessionPath(_L("c:\\")); testUtils->GoClientSideL(); testUtils->CreateSmtpServiceL(); pop3Service = testUtils->CreatePopServiceL(); testUtils->GoServerSideL(); testUtils->CreateMessageL(K_T_MIUT10_PLAIN_MSG, pop3Service, pop3Service); testUtils->CreateMessageL(K_T_MIUT10_PLAIN_MSG, pop3Service, pop3Service); testUtils->CreateMessageL(K_T_MIUT10_HTML_ATTACHMENT_MSG, pop3Service, pop3Service); test.Printf(_L("\nPerforming Cache Management Tests\n")); testUtils->GoClientSideL(); testUtils->iMsvEntry->SetEntryL(pop3Service); TMsvEntry entry = testUtils->iMsvEntry->Entry(); entry.SetVisible(ETrue); testUtils->iMsvEntry->ChangeL(entry); TRequestStatus observerStatus; CImCacheManager* cacheManager = CFilteredCacheManager::NewL(*testUtils->iMsvSession, observerStatus); CleanupStack::PushL(cacheManager); TestUiTimer* testUiTimer = TestUiTimer::NewLC(test.Console(), cacheManager); CTestActive* testActive = new (ELeave) CTestActive(); CleanupStack::PushL(testActive); testActive->StartL(); testUiTimer->IssueRequest(); testUtils->TestStart(0, K_T_MIUT10_DESCRIPTION); cacheManager->StartL(pop3Service, testActive->iStatus); CActiveScheduler::Start(); // DEF066273: rewrite-Messaging regression test T_MIUT10 failing consistently // DEF049479: is no longer valid it has therefore not been taken into consideration //ensure at correct service entry testUtils->iMsvEntry->SetEntryL(pop3Service); //store msg entires of this service CMsvEntrySelection* popEntrySelection; popEntrySelection=testUtils->iMsvEntry->ChildrenL(); CleanupStack::PushL(popEntrySelection); TInt count=popEntrySelection->Count(); TInt childEntries; TMsvId msgId; TMsvEntry msgEntry; TBuf<128> msgFail,msgPass; for(TInt i=0; i<count; ++i) { //ensure at correct location msgId=popEntrySelection->At(i); testUtils->iMsvEntry->SetEntryL(msgId); // testUtils->iMsvEntry->Entry(); //ensure that there are no more child entries childEntries=testUtils->iMsvEntry->Count(); if (childEntries!=0 && DONT_PRUNE_ID!=msgId) { //body text or attachments still exist msgFail.Format(K_T_MIUT10_MSG_NOT_PRUNED,msgId); testUtils->WriteComment(msgFail); globalError = KErrMsgNotPruned; } else { //email successfully-prunned header saved. msgPass.Format(K_T_MIUT10_MSG_PRUNED,msgId); testUtils->WriteComment(msgPass); } } testUtils->TestFinish(0, globalError); if (globalError == KErrNone) { testUtils->TestHarnessCompleted(); } else { testUtils->TestHarnessFailed(globalError); } CleanupStack::PopAndDestroy(4,cacheManager); // testActive, testUiTimer, cacheManager,popEntrySelection Closedown(); }
void CMmMessageRouter::ConstructL() { InitL(); InitModulesL(); }
Kinematics::Kinematics(Kinematics_Type type) { if (type==Kinematics_Left) InitL(); if (type==Kinematics_Right) InitR(); }
LOCAL_C void TestL() { __UHEAP_MARK; test.Start(_L("Setting up test table")); TRAPD(r,InitL();)
void CPopsTestHarness::ConstructL() { iTestUtils = CEmailTestUtils::NewL(test); InitL(); }
// --------------------------------------------------------- // Default constructor. // --------------------------------------------------------- // MsgStoreHandler::MsgStoreHandler(MsgNotifierPrivate* notifier, CCSRequestHandler* aCvServer) : CActive(EPriorityStandard), iMsvSession(NULL), iNotifier(notifier), iRequestHandler(aCvServer) { InitL(); }
LOCAL_C void doMainL() { SetKnownDateAndTime(); InitL(); if (testFailed) { Closedown(); return; } testUtils->GoClientSideL(); smtpService = testUtils->CreateSmtpServiceL(); pop3Service = testUtils->CreatePopServiceL(); testUtils->GoServerSideL(); testUtils->CreateMessageFilesL(pop3Service, KMsvGlobalInBoxIndexEntryId, _L("c:\\mailtest\\IMCM\\")); test.Console()->SetPos(0, 6); test.Printf(_L("Performing Tests:\n")); testUtils->GoClientSideL(); SetDefaultServiceL(smtpService); // get a list of all email messages in the Inbox testUtils->iMsvEntry->SetEntryL(KMsvGlobalInBoxIndexEntryId); delete messageSelection; messageSelection = testUtils->iMsvEntry->ChildrenWithTypeL(KUidMsvMessageEntry); TParse parsedFileName; TFileName name(KTestMessageDir); testUtils->ResolveLogFile(name, parsedFileName); TMsvId messageWithIncompleteAttachment = CreateNewPlaintextMessageWithIncompleteAttachmentL(); SetKnownDateAndTime(); test.Console()->SetPos(3, 8); test.Printf(_L("Create Forward Tests 1:")); //Create Forward As Attachment html message with attachment and no text alternative to the HTML testUtils->WriteComment(_L("Test 2 - Create Forward As Atcmt to HTML message with atcmt and no text alt. Tests")); TRAPD(ret,DoHtmlCreateForwardAsAttachmentTestsL(messageSelection->At(3))); if (ret) { testUtils->TestFinish(testNo,ret); testUtils->TestHarnessFailed(ret); delete messageSelection; Closedown(); return; } SetKnownDateAndTime(); test.Console()->SetPos(3, 9); test.Printf(_L("Create Forward Tests 2:")); //Create Forward As Attachment message with attachment which is not complete testUtils->WriteComment(_L("Test 2 - Create Forward As Atcmt to Plaintext message with incomplete atcmt Tests")); messageWithIncompleteAttachment = CreateNewPlaintextMessageWithIncompleteAttachmentL(); TRAP(ret,DoHtmlCreateForwardAsAttachmentTestsL(messageWithIncompleteAttachment)); if (ret) { testUtils->TestFinish(testNo,ret); testUtils->TestHarnessFailed(ret); delete messageSelection; Closedown(); return; } RestoreDateAndTime(); testUtils->FindChildrenL(KMsvGlobalOutBoxIndexEntryId, parsedFileName.FullName(), ETrue, EFalse); // writes message info (from Outbox) into files testUtils->TestFinish(testNo-1); testUtils->TestHarnessCompleted(); delete messageSelection; Closedown(); // shouldn't have to do this, but convertor plugins aren't // doing it yet so we get a false memory leak so remove this // when they fix that. REComSession::FinalClose(); }