~ubuntu-branches/ubuntu/utopic/nepomuk-core/utopic

« back to all changes in this revision

Viewing changes to services/backupsync/lib/test/nepomuksynctests.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-07-26 22:43:09 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20120726224309-pf2v1e78ee7uljjp
Tags: 4:4.9.0a-0ubuntu1
* Use direct build-depends versions rather than kde-sc-dev-latest
* New upstream release
* New symbols, rename libnepomukcore4 to libnepomukcore4abi and enable Debian ABI manager

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
    Nepomuk2::Resource res1( file.fileName() );
102
102
    res1.addProperty( QUrl( propString + '5' ), Nepomuk2::Variant( 5 ) );
103
103
    
104
 
    Soprano::Node context = model->listStatements( res1.resourceUri(), QUrl( propString + '5' ), Soprano::Node( Soprano::LiteralValue( 5 ) ) ).iterateContexts().allElements().first();
 
104
    Soprano::Node context = model->listStatements( res1.uri(), QUrl( propString + '5' ), Soprano::Node( Soprano::LiteralValue( 5 ) ) ).iterateContexts().allElements().first();
105
105
    
106
106
    QHash<KUrl, Nepomuk2::Resource> hash;
107
107
    hash.insert( res1uri, res1 );
111
111
    
112
112
    // Check if res1uri was mapped to res1 and all its properties were added.
113
113
    for( int i=0; i<10; i++ ) {
114
 
        QVERIFY( model->containsAnyStatement( res1.resourceUri(), QUrl( propString + ( i + '0' ) ), Soprano::Node() ) );
 
114
        QVERIFY( model->containsAnyStatement( res1.uri(), QUrl( propString + ( i + '0' ) ), Soprano::Node() ) );
115
115
    }
116
116
    
117
117
    // Make sure that the already present statements were not messed with
118
 
    Soprano::Node context2 = model->listStatements( res1.resourceUri(), QUrl( propString + '5' ), Soprano::Node( Soprano::LiteralValue( 5 ) ) ).iterateContexts().allElements().first();
 
118
    Soprano::Node context2 = model->listStatements( res1.uri(), QUrl( propString + '5' ), Soprano::Node( Soprano::LiteralValue( 5 ) ) ).iterateContexts().allElements().first();
119
119
    
120
120
    QVERIFY( context == context2 );
121
121
    
122
122
    // Property10 did not have a valid mapping for its object. A new Resource should
123
123
    // have been created
124
 
    Soprano::Node newResNode = model->listStatements( res1.resourceUri(), QUrl( propString + "10" ), Soprano::Node() ).iterateObjects().allNodes().first();
 
124
    Soprano::Node newResNode = model->listStatements( res1.uri(), QUrl( propString + "10" ), Soprano::Node() ).iterateObjects().allNodes().first();
125
125
 
126
126
    kDebug() << newResNode.uri();
127
127
    QVERIFY( !newResNode.uri().isEmpty() );