Commit 72ad8360 authored by Marko Mattila's avatar Marko Mattila

[nemo-transfer-engine] Added tests.xml and updated unit tests to follow the documentation.

parent 6a7fee14
TARGET = ut_nemo-transfer-engine
INCLUDEPATH += . ../src ../lib
......@@ -30,8 +31,11 @@ LIBS += -lquillmetadata
QT += testlib
PATH = /opt/tests/nemo-transfer-engine
resources.files = testimage.jpg
resources.path = $$PATH
test_def.files = tests.xml
test_def.path = $$PATH
resources.files = images/testimage.jpg
resources.path = $$PATH/images
target.path = $$PATH
INSTALLS += target resources
INSTALLS += target resources test_def
<?xml version="1.0" encoding="UTF-8"?>
<testdefinition version="1.0">
<suite name="NemoTransferEngine" domain="middleware">
<description>Nemo Transfer Engine automatic tests</description>
<set name="unit-tests" feature="Internal UI Components">
<description>Nemo Transfer Engine unit tests</description>
<case manual="false" name="enginetests">
......@@ -95,10 +95,10 @@ void ut_imageoperation::testUniqueFilePath()
void ut_imageoperation::testScale()
QImage img("testimage.jpg");
QImage img("images/testimage.jpg");
QString filePath("testimage.jpg");
QString filePath("images/testimage.jpg");
QString target = ImageOperation::uniqueFilePath(filePath);
......@@ -136,8 +136,8 @@ void ut_imageoperation::testDropMetadata()
// title description, but it contains the most essential fields related
// to location and the author.
// First make sure that there is metadata
QCOMPARE(QuillMetadata::canRead("testimage.jpg"), true);
QuillMetadata md("testimage.jpg");
QCOMPARE(QuillMetadata::canRead("images/testimage.jpg"), true);
QuillMetadata md("images/testimage.jpg");
QCOMPARE(md.isValid(), true);
QVariant creator = md.entry(QuillMetadata::Tag_Creator);
......@@ -155,7 +155,7 @@ void ut_imageoperation::testDropMetadata()
QCOMPARE(lat.isNull(), false);
QCOMPARE(lon.isNull(), false);
QString path = ImageOperation::removeImageMetadata("testimage.jpg");
QString path = ImageOperation::removeImageMetadata("images/testimage.jpg");
QCOMPARE(QFile::exists(path), true);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment