106 } |
106 } |
107 |
107 |
108 void TestMpShareData::testOwner() |
108 void TestMpShareData::testOwner() |
109 { |
109 { |
110 mTest->setOwner(this); |
110 mTest->setOwner(this); |
111 QCOMPARE(mTest->owner(), this); |
111 QCOMPARE(mTest->owner(), (QObject*) this); |
112 } |
112 } |
113 |
113 |
114 void TestMpShareData::testSongData() |
114 void TestMpShareData::testSongData() |
115 { |
115 { |
116 MpSongData *song = new MpSongData(); |
116 MpSongData *song = new MpSongData(); |
227 mTest->setSongData(song); |
227 mTest->setSongData(song); |
228 QCOMPARE(mTest->title(), QString("TestTitle")); |
228 QCOMPARE(mTest->title(), QString("TestTitle")); |
229 delete song; |
229 delete song; |
230 } |
230 } |
231 |
231 |
232 //void TestMpShareData::testSongAlbum() |
|
233 //{ |
|
234 // MpSongData *song = new MpSongData(); |
|
235 // song->setAlbum("TestAlbum"); |
|
236 // mTest->setSongData(song); |
|
237 // QCOMPARE(mTest->album(), QString("TestAlbum")); |
|
238 // delete song; |
|
239 //} |
|
240 |
232 |
241 void TestMpShareData::testSongArtist() |
233 void TestMpShareData::testSongArtist() |
242 { |
234 { |
243 MpSongData *song = new MpSongData(); |
235 MpSongData *song = new MpSongData(); |
244 song->setArtist("TestArtist"); |
236 song->setArtist("TestArtist"); |
261 mTest->setSongData(song); |
253 mTest->setSongData(song); |
262 mTest->setLanguage("fi"); |
254 mTest->setLanguage("fi"); |
263 QCOMPARE(mTest->language(), QString("fi")); |
255 QCOMPARE(mTest->language(), QString("fi")); |
264 delete song; |
256 delete song; |
265 } |
257 } |
266 |
|
267 /* |
|
268 void TestMpShareData::testSongComment() |
|
269 { |
|
270 MpSongData *song = new MpSongData(); |
|
271 song->setComment("TestComment"); |
|
272 mTest->setSongData(song); |
|
273 QCOMPARE(mTest->comment(), QString("TestComment")); |
|
274 delete song; |
|
275 } |
|
276 |
|
277 void TestMpShareData::testSongAlbumArt() |
|
278 { |
|
279 MpSongData *song = new MpSongData(); |
|
280 song->setAlbumArtUri("TestAlbum"); |
|
281 mTest->setSongData(song); |
|
282 QPixmap pic; |
|
283 mTest->albumArt(pic); |
|
284 delete song; |
|
285 } |
|
286 |
|
287 void TestMpShareData::testSongYear() |
|
288 { |
|
289 MpSongData *song = new MpSongData(); |
|
290 song->setYear(1999); |
|
291 mTest->setSongData(song); |
|
292 QCOMPARE(mTest->year(), QString("1999")); |
|
293 delete song; |
|
294 } |
|
295 |
|
296 void TestMpShareData::testSongGenre() |
|
297 { |
|
298 MpSongData *song = new MpSongData(); |
|
299 song->setGenre("TestGenre"); |
|
300 mTest->setSongData(song); |
|
301 QCOMPARE(mTest->genre(), QString("TestGenre")); |
|
302 delete song; |
|
303 } |
|
304 |
|
305 void TestMpShareData::testSongComposer() |
|
306 { |
|
307 MpSongData *song = new MpSongData(); |
|
308 song->setComposer("TestComposer"); |
|
309 mTest->setSongData(song); |
|
310 QCOMPARE(mTest->composer(), QString("TestComposer")); |
|
311 delete song; |
|
312 } |
|
313 |
|
314 void TestMpShareData::testSongAlbumTrack() |
|
315 { |
|
316 MpSongData *song = new MpSongData(); |
|
317 song->setAlbumTrack("TestAlbumTrack"); |
|
318 mTest->setSongData(song); |
|
319 QCOMPARE(mTest->albumTrack(), QString("TestAlbumTrack")); |
|
320 delete song; |
|
321 } |
|
322 |
|
323 void TestMpShareData::testSongLink() |
|
324 { |
|
325 MpSongData *song = new MpSongData(); |
|
326 song->setLink("TestLink"); |
|
327 mTest->setSongData(song); |
|
328 QCOMPARE(mTest->link(), QString("TestLink")); |
|
329 delete song; |
|
330 } |
|
331 */ |
|
332 |
258 |
333 void TestMpShareData::testSongNoInfo() |
259 void TestMpShareData::testSongNoInfo() |
334 { |
260 { |
335 QCOMPARE(mTest->title(), QString("Unknown")); |
261 QCOMPARE(mTest->title(), QString("Unknown")); |
336 // QCOMPARE(mTest->album(), QString("")); |
262 // QCOMPARE(mTest->album(), QString("")); |