Search in sources :

Example 6 with ContentTypeEvaluationCriteriaImpl

use of ddf.catalog.pubsub.criteria.contenttype.ContentTypeEvaluationCriteriaImpl in project ddf by codice.

the class PredicateTest method testContentTypeEvaluatorTypeAndVersionTypeMismatch.

@Test
public void testContentTypeEvaluatorTypeAndVersionTypeMismatch() throws Exception {
    LOGGER.debug("**************************  START: testContentTypeEvaluator_TypeAndVersion_TypeMismatch()  ***********************");
    // Match on "nitf, v20"
    ContentTypePredicate predicate = new ContentTypePredicate("nitf", "v20");
    String inputContentType = "video,v20";
    ContentTypeEvaluationCriteriaImpl ctec = new ContentTypeEvaluationCriteriaImpl(predicate, inputContentType);
    boolean status = ContentTypeEvaluator.evaluate(ctec);
    assertFalse(status);
    LOGGER.debug("**************************  END: testContentTypeEvaluator_TypeAndVersion_TypeMismatch()  ***********************");
}
Also used : ContentTypeEvaluationCriteriaImpl(ddf.catalog.pubsub.criteria.contenttype.ContentTypeEvaluationCriteriaImpl) ContentTypePredicate(ddf.catalog.pubsub.predicate.ContentTypePredicate) Test(org.junit.Test)

Aggregations

ContentTypeEvaluationCriteriaImpl (ddf.catalog.pubsub.criteria.contenttype.ContentTypeEvaluationCriteriaImpl)6 ContentTypePredicate (ddf.catalog.pubsub.predicate.ContentTypePredicate)5 Test (org.junit.Test)5 Map (java.util.Map)1