calendarui/tsrc/unittest_calenviewerservice/src/test_calenviewerservice.cpp
changeset 49 5de72ea7a065
equal deleted inserted replaced
37:360d55486d7f 49:5de72ea7a065
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 #include <xqaiwdeclplat.h>
       
    19 #include <QtTest/QtTest>
       
    20 
       
    21 #include "test_calenviewerservice.h"
       
    22 
       
    23 TestCalenViewerService::TestCalenViewerService()
       
    24 {
       
    25     // No implementation yet
       
    26 }
       
    27 
       
    28 TestCalenViewerService::~TestCalenViewerService()
       
    29 {
       
    30     // No implementation yet
       
    31 }
       
    32 
       
    33 void TestCalenViewerService::init()
       
    34 {
       
    35     // No implementation yet
       
    36 }
       
    37 
       
    38 void TestCalenViewerService::cleanup()
       
    39 {
       
    40     // No implementation yet
       
    41 }
       
    42 
       
    43 void TestCalenViewerService::testOpeningVCal()
       
    44 {
       
    45     QTest::qWait(2);
       
    46     
       
    47     QFile file("z:\\data\\others\\meeting.vcs");
       
    48 
       
    49     XQApplicationManager mAppMgr;
       
    50     XQAiwRequest *request;
       
    51     QVERIFY(request = mAppMgr.create(file));
       
    52     
       
    53     // Set function parameters
       
    54     QList<QVariant> args;
       
    55     args << file.fileName();
       
    56     request->setArguments(args);
       
    57     request->setEmbedded(true);
       
    58 
       
    59     // Send the request
       
    60     bool res;
       
    61     QVERIFY(res = request->send());
       
    62     
       
    63     delete request;
       
    64 }
       
    65 
       
    66 void TestCalenViewerService::testOpeningICal()
       
    67 {
       
    68     // TODO: Both the test cases cannot be run in sequence
       
    69     // due to some issues in Qt/Highway framework. Need to
       
    70     // re-check on newer version and then modify the test case
       
    71     // if required
       
    72     
       
    73     /*QTest::qWait(2);
       
    74     
       
    75     QFile file("z:\\data\\others\\meeting.ics");
       
    76 
       
    77     XQApplicationManager mAppMgr;
       
    78     XQAiwRequest *request;
       
    79     QVERIFY(request = mAppMgr.create(file));
       
    80     
       
    81     // Set function parameters
       
    82     QList<QVariant> args;
       
    83     args << file.fileName();
       
    84     request->setArguments(args);
       
    85     request->setEmbedded(true);
       
    86 
       
    87     // Send the request
       
    88     bool res;
       
    89     QVERIFY(res = request->send());
       
    90     
       
    91     delete request;*/
       
    92 }