fix some more header includes
[toast/confclerk.git] / src / test / mvc / eventtest.cpp
index 232421a..109816e 100644 (file)
@@ -1,3 +1,22 @@
+/*
+ * Copyright (C) 2010 Ixonos Plc.
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
+ *
+ * This file is part of ConfClerk.
+ *
+ * ConfClerk is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * ConfClerk is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * ConfClerk.  If not, see <http://www.gnu.org/licenses/>.
+ */
 #include "eventtest.h"
 
 #include <QtTest>
 
 #include <QDebug>
 
-#include <event.h>
+#include "event.h"
 
 void EventTest::initTestCase()
 {
     // Connect to the test database. Ask Mr. Pavelka to generate one for you :)
     QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
-    db.setDatabaseName("fosdem-test.sqlite");
+    db.setDatabaseName("ConfClerk-test.sqlite");
     QVERIFY(db.open());
 }
 
@@ -21,7 +40,7 @@ void EventTest::getById()
 
     QCOMPARE(event.id(), 500);
     QCOMPARE(event.start(), QDateTime(QDate(2009, 2, 7), QTime(11, 30, 0), Qt::UTC));
-    QCOMPARE(event.activityId(), 123);
+    QCOMPARE(event.trackId(), 123);
 
     // !!! TODO: typeId and languageId
     QCOMPARE(event.type(), QString("Podium"));
@@ -42,7 +61,7 @@ void EventTest::storingValues()
     event.setConferenceId(20);
     event.setStart(QDateTime::fromString("Sat Feb 7 11:30:00 2009"));
     event.setDuration(30);
-    event.setActivityId(40);
+    event.setTrackId(40);
     event.setType(QString("type"));
     event.setLanguage(QString("language"));
 
@@ -50,7 +69,7 @@ void EventTest::storingValues()
     QCOMPARE(event.conferenceId(), 20);
     QCOMPARE(event.start(), QDateTime::fromString("Sat Feb 7 11:30:00 2009"));
     QCOMPARE(event.duration(), 30);
-    QCOMPARE(event.activityId(), 40);
+    QCOMPARE(event.trackId(), 40);
     QCOMPARE(event.type(), QString("type"));
     QCOMPARE(event.language(), QString("language"));
 }
@@ -70,12 +89,12 @@ void EventTest::hydrate()
 
 void EventTest::columnsForSelect()
 {
-    QCOMPARE(Event::columnsForSelect(), QString("id,xid_conference,start,duration,xid_activity,type,language"));
+    QCOMPARE(Event::columnsForSelect(), QString("id,xid_conference,start,duration,xid_track,type,language"));
     QCOMPARE(Event::columnsForSelect("t0"),
-             QString("t0.id,t0.xid_conference,t0.start,t0.duration,t0.xid_activity,t0.type,t0.language"));
+             QString("t0.id,t0.xid_conference,t0.start,t0.duration,t0.xid_track,t0.type,t0.language"));
 }
 
 void EventTest::selectQuery()
 {
-    QCOMPARE(Event::selectQuery(), QString("SELECT id,xid_conference,start,duration,xid_activity,type,language FROM event "));
+    QCOMPARE(Event::selectQuery(), QString("SELECT id,xid_conference,start,duration,xid_track,type,language FROM event "));
 }