Example #1
0
void PictureTest::storeTestExtern()
{
  KABC::Picture picture;

  picture.setUrl( QLatin1String( "http://myhomepage.com/foto.png" ), QLatin1String( "png" ) );

  QVERIFY( picture.isEmpty() == false );
  QVERIFY( picture.isIntern() == false );
  QVERIFY( picture.type() == QLatin1String( "png" ) );
  QVERIFY( picture.url() == QLatin1String( "http://myhomepage.com/foto.png" ) );
}
Example #2
0
void PictureTest::storeTestInternRawData()
{
  KABC::Picture picture;

  picture.setRawData( testImageRawPNG(), QLatin1String( "png" ) );

  QVERIFY( picture.isEmpty() == false );
  QVERIFY( picture.isIntern() == true );
  QVERIFY( picture.type() == QLatin1String( "png" ) );
  QVERIFY( picture.rawData() == testImageRawPNG() );
  QVERIFY( picture.data() == testImage() );
}