[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [tellico/frameworks] src: update isbnfetchertest
From:       Robby Stephenson <robby () periapsis ! org>
Date:       2015-06-01 1:06:45
Message-ID: E1YzEBh-0008KJ-86 () scm ! kde ! org
[Download RAW message or body]

Git commit 8c82ec04c7555033fd3764b945392bc90bc9df8f by Robby Stephenson.
Committed on 31/05/2015 at 13:46.
Pushed by rstephenson into branch 'frameworks'.

update isbnfetchertest

M  +1    -0    src/fetch/isbndbfetcher.cpp
M  +4    -2    src/tests/CMakeLists.txt
M  +4    -4    src/tests/isbndbfetchertest.cpp

http://commits.kde.org/tellico/8c82ec04c7555033fd3764b945392bc90bc9df8f

diff --git a/src/fetch/isbndbfetcher.cpp b/src/fetch/isbndbfetcher.cpp
index cb257b0..f37a1f4 100644
--- a/src/fetch/isbndbfetcher.cpp
+++ b/src/fetch/isbndbfetcher.cpp
@@ -196,6 +196,7 @@ void ISBNdbFetcher::slotComplete(KJob*) {
   QDomDocument dom;
   if(!dom.setContent(data, false)) {
     myWarning() << "server did not return valid XML.";
+    stop();
     return;
   }
 =

diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index d6bfd74..58ea051 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -536,11 +536,13 @@ add_test(imdbfetchertest imdbfetchertest)
 ecm_mark_as_test(imdbfetchertest)
 TARGET_LINK_LIBRARIES(imdbfetchertest fetcherstest ${TELLICO2_TEST_LIBS})
 =

-add_executable(isbndbfetchertest isbndbfetchertest.cpp abstractfetchertest=
.cpp)
+add_executable(isbndbfetchertest isbndbfetchertest.cpp abstractfetchertest=
.cpp
+  ../fetch/isbndbfetcher.cpp
+)
 ecm_mark_nongui_executable(isbndbfetchertest)
 add_test(isbndbfetchertest isbndbfetchertest)
 ecm_mark_as_test(isbndbfetchertest)
-TARGET_LINK_LIBRARIES(isbndbfetchertest fetch ${TELLICO_TEST_LIBS})
+TARGET_LINK_LIBRARIES(isbndbfetchertest fetcherstest ${TELLICO2_TEST_LIBS})
 =

 add_executable(moviemeterfetchertest moviemeterfetchertest.cpp abstractfet=
chertest.cpp)
 ecm_mark_nongui_executable(moviemeterfetchertest)
diff --git a/src/tests/isbndbfetchertest.cpp b/src/tests/isbndbfetchertest.=
cpp
index 63923d9..278b7ba 100644
--- a/src/tests/isbndbfetchertest.cpp
+++ b/src/tests/isbndbfetchertest.cpp
@@ -25,17 +25,17 @@
 #undef QT_NO_CAST_FROM_ASCII
 =

 #include "isbndbfetchertest.h"
-#include "qtest_kde.h"
 =

 #include "../fetch/isbndbfetcher.h"
 #include "../entry.h"
 #include "../collections/bookcollection.h"
 #include "../collectionfactory.h"
 #include "../images/imagefactory.h"
+#include "../utils/datafileregistry.h"
 =

-#include <KStandardDirs>
+#include <QTest>
 =

-QTEST_KDEMAIN( ISBNdbFetcherTest, GUI )
+QTEST_GUILESS_MAIN( ISBNdbFetcherTest )
 =

 ISBNdbFetcherTest::ISBNdbFetcherTest() : AbstractFetcherTest() {
 }
@@ -43,7 +43,7 @@ ISBNdbFetcherTest::ISBNdbFetcherTest() : AbstractFetcherT=
est() {
 void ISBNdbFetcherTest::initTestCase() {
   Tellico::ImageFactory::init();
   Tellico::RegisterCollection<Tellico::Data::BookCollection> registerBook(=
Tellico::Data::Collection::Book, "book");
-  KGlobal::dirs()->addResourceDir("appdata", QString::fromLatin1(KDESRCDIR=
) + "/../../xslt/");
+  Tellico::DataFileRegistry::self()->addDataLocation(QFINDTESTDATA("../../=
xslt/isbndb2tellico.xsl"));
 }
 =

 void ISBNdbFetcherTest::testIsbn() {

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic