Changeset 489f262 for src/test


Ignore:
Timestamp:
12/31/09 12:24:20 (13 years ago)
Author:
komarma <komarma@…>
Branches:
master, qt5
Children:
d0d0a66
Parents:
20a6010
Message:

Fixing datetime conversion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/test/model/eventtest.cpp

    r20a6010 r489f262  
    1919{
    2020    Event event = Event::getById(500, 1);
     21
    2122    QCOMPARE(event.id(), 500);
    22     QCOMPARE(event.start(), QDateTime::fromString("Sat Feb 7 11:30:00 2009"));
     23    QCOMPARE(event.start(), QDateTime(QDate(2009, 2, 7), QTime(11, 30, 0), Qt::UTC));
    2324    QCOMPARE(event.activityId(), 123);
    2425
    2526    // !!! TODO: typeId and languageId
    26     QCOMPARE(event.typeId(), 0);
    27     QCOMPARE(event.languageId(), 0);
     27    QCOMPARE(event.type(), QString("Podium"));
     28    QCOMPARE(event.language(), QString("English"));
    2829}
    2930
     
    3738    event.setDuration(30);
    3839    event.setActivityId(40);
    39     event.setTypeId(50);
    40     event.setLanguageId(60);
     40    event.setType(QString("type"));
     41    event.setLanguage(QString("language"));
    4142
    4243    QCOMPARE(event.id(), 10);
     
    4546    QCOMPARE(event.duration(), 30);
    4647    QCOMPARE(event.activityId(), 40);
    47     QCOMPARE(event.typeId(), 50);
    48     QCOMPARE(event.languageId(), 60);
     48    QCOMPARE(event.type(), QString("type"));
     49    QCOMPARE(event.language(), QString("language"));
    4950}
    50 
    5151
    5252void EventTest::hydrate()
Note: See TracChangeset for help on using the changeset viewer.