~ubuntu-branches/ubuntu/precise/kde-runtime/precise-proposed

« back to all changes in this revision

Viewing changes to nepomuk/services/storage/test/datamanagementmodeltest.cpp

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2012-03-30 21:36:32 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20120330213632-xsvx5vu8qg50aui7
Tags: 4:4.8.2-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
4669
4669
 
4670
4670
    int emailCount = m_model->listStatements( Node(), RDF::type(), NCO::EmailAddress() ).allStatements().size();
4671
4671
    QCOMPARE( emailCount, 1 );
4672
 
}
4673
 
 
 
4672
 
 
4673
    QVERIFY(!haveTrailingGraphs());
 
4674
    QVERIFY(!haveDataInDefaultGraph());
 
4675
}
 
4676
 
 
4677
void DataManagementModelTest::testStoreResources_duplicatesInMerger()
 
4678
{
 
4679
    SimpleResource contact1;
 
4680
    contact1.addType( NCO::PersonContact() );
 
4681
    contact1.setProperty( NCO::fullname(), QLatin1String("Rachel McAdams") );
 
4682
 
 
4683
    SimpleResourceGraph graph;
 
4684
    graph << contact1;
 
4685
 
 
4686
    m_dmModel->storeResources( graph, QLatin1String("appA") );
 
4687
    QVERIFY(!m_dmModel->lastError());
 
4688
 
 
4689
    SimpleResource contact2;
 
4690
    contact2.addType( NCO::PersonContact() );
 
4691
    contact2.setProperty( NCO::fullname(), QLatin1String("Rachel McAdams") );
 
4692
    contact2.setProperty( NAO::prefLabel(), QLatin1String("Rachel McAdams") );
 
4693
 
 
4694
    graph << contact2;
 
4695
 
 
4696
    m_dmModel->storeResources( graph, QLatin1String("appA") );
 
4697
    QVERIFY(!m_dmModel->lastError());
 
4698
 
 
4699
    QVERIFY(!haveTrailingGraphs());
 
4700
    QVERIFY(!haveDataInDefaultGraph());
 
4701
}
4674
4702
 
4675
4703
void DataManagementModelTest::testStoreResources_overwriteProperties()
4676
4704
{