2
* Copyright (C) 2012 Canonical, Ltd.
5
* Guenter Schwann <guenter.schwann@canonical.com>
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; version 3.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
#include <QtTest/QtTest>
24
#include "gallery-thumbnail-image-provider.h"
26
class tst_GalleryThumbnailImageProvider : public QObject
30
tst_GalleryThumbnailImageProvider();
36
GalleryThumbnailImageProvider gallery_thumbnail_image_provider;
39
tst_GalleryThumbnailImageProvider::tst_GalleryThumbnailImageProvider()
40
: gallery_thumbnail_image_provider()
44
void tst_GalleryThumbnailImageProvider::ToURL()
46
QFileInfo fi("/tmp/test.jpg");
47
QUrl url = gallery_thumbnail_image_provider.toURL(fi);
48
QUrl expect("image://gallery-thumbnail//tmp/test.jpg");
49
QCOMPARE(url, expect);
52
QTEST_MAIN(tst_GalleryThumbnailImageProvider);
54
#include "tst_gallerythumbnailimageprovider.moc"