예제 #1
0
 @Test
 public void testPresentTotalCount() throws URISyntaxException {
   Integer totalResults = new Integer(17);
   Resource thisMetaPage = createMetadata(true, totalResults);
   Literal tr = thisMetaPage.getModel().createTypedLiteral(totalResults);
   assertTrue(thisMetaPage.hasProperty(OpenSearch.totalResults, tr));
 }
예제 #2
0
 @Test
 public void testAbsentTotalCount() throws URISyntaxException {
   Integer totalResults = null;
   Resource thisMetaPage = createMetadata(true, totalResults);
   assertFalse(thisMetaPage.hasProperty(OpenSearch.totalResults));
 }
예제 #3
0
 @Test
 public void testItemEndpointHasCorrectType() throws URISyntaxException {
   Integer totalResults = null;
   Resource thisMetaPage = createMetadata(false, totalResults);
   assertTrue(thisMetaPage.hasProperty(RDF.type, API.ItemEndpoint));
 }