4 #include "ut_location.h"
6 QByteArray sampleInput(
8 <?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?><MTRXML version=\"1.0\">\
9 <GEOCODE key=\"taivaanvuohentie 7,helsinki\">\
10 <LOC name1=\"Taivaanvuohentie\" number=\"7\" city=\"Helsinki\" code=\"\" address=\"\" type=\"900\" category=\"street\" x=\"2549183\" y=\"6672570\" lon=\"24.88256\" lat=\"60.16183\" />\
17 void Ut_Location::init()
19 m_subject = new LocationPrivate();
22 void Ut_Location::cleanup()
28 void Ut_Location::initTestCase()
32 void Ut_Location::cleanupTestCase()
36 void Ut_Location::testParseReply()
38 m_subject->parseReply( sampleInput );
40 QCOMPARE( m_subject->x(), QString( "2549183" ) );
41 QCOMPARE( m_subject->y(), QString( "6672570" ) );
44 void Ut_Location::testSet()
46 QString x( "2549183" );
47 QString y( "6672570" );
50 QCOMPARE( x, m_subject->x() );
51 QCOMPARE( y, m_subject->y() );
54 QTEST_MAIN(Ut_Location)