lambdora-service/src/test/java/org/fcrepo/lambdora/service/db/DynamoDBResourceTripleDaoTest.java
/**
     * Tests finding triples based on resource name (uri) and rdf predicate
     */
Tests finding triples based on resource name (uri) and rdf predicate
Tests finding triples based on resource name ( uri ) and rdf predicate
@Test
    public void testFindByResourceNameAndPredicate() {
        final List<ResourceTriple> resultList =
            resourceTripleDao.findByResourceNameAndPredicate(resource1, t1b[1]);
        assertEquals(1, resultList.size());
        for (ResourceTriple triple : resultList) {
            assertEquals(t1b[0], triple.getRdfSubject());
            assertEquals(t1b[1], triple.getRdfPredicate());
            assertEquals(t1b[2], triple.getRdfObject());
            assertEquals(resource1, triple.getResourceName());
            assertEquals(triple1b, triple.getRdfTriple());
        }
    }
@ Test public void testFindByResourceNameAndPredicate ( ) { final List < ResourceTriple > resultList = resourceTripleDao . findByResourceNameAndPredicate ( resource1 , t1b [ 1 ] ) ; assertEquals ( 1 , resultList . size ( ) ) ; for ( ResourceTriple triple : resultList ) { assertEquals ( t1b [ 0 ] , triple . getRdfSubject ( ) ) ; assertEquals ( t1b [ 1 ] , triple . getRdfPredicate ( ) ) ; assertEquals ( t1b [ 2 ] , triple . getRdfObject ( ) ) ; assertEquals ( resource1 , triple . getResourceName ( ) ) ; assertEquals ( triple1b , triple . getRdfTriple ( ) ) ; } }
Tests finding triples based on resource name (uri) and rdf predicate
Tests finding triples based on resource name ( uri ) and rdf predicate