use of com.yahoo.document.predicate.Predicate in project vespa by vespa-engine.
the class PredicateFieldValueTest method requireThatWrappedValueIsPredicate.
@Test
public void requireThatWrappedValueIsPredicate() {
Predicate predicate = SimplePredicates.newPredicate();
PredicateFieldValue value = new PredicateFieldValue(predicate);
assertSame(predicate, value.getWrappedValue());
}
use of com.yahoo.document.predicate.Predicate in project vespa by vespa-engine.
the class PredicateFieldValueTest method requireThatPredicateFieldValueCanBeAssigned.
@Test
public void requireThatPredicateFieldValueCanBeAssigned() {
Predicate predicate = SimplePredicates.newPredicate();
PredicateFieldValue value = new PredicateFieldValue();
value.assign(new PredicateFieldValue(predicate));
assertSame(predicate, value.getPredicate());
}
use of com.yahoo.document.predicate.Predicate in project vespa by vespa-engine.
the class PredicateFieldValueTest method requireThatXmlOutputIsPredicateLanguage.
@Test
public void requireThatXmlOutputIsPredicateLanguage() {
Predicate predicate = new FeatureSet("key", "valueA", "valueB");
XmlStream expected = new XmlStream();
expected.beginTag("tag");
expected.addContent(predicate.toString());
expected.endTag();
assertEquals(expected.toString(), printXml("tag", new PredicateFieldValue(predicate)));
}
use of com.yahoo.document.predicate.Predicate in project vespa by vespa-engine.
the class PredicateFieldValueTest method requireThatPredicateCanBeAssigned.
@Test
public void requireThatPredicateCanBeAssigned() {
Predicate predicate = SimplePredicates.newPredicate();
PredicateFieldValue value = new PredicateFieldValue();
value.assign(predicate);
assertSame(predicate, value.getPredicate());
}
use of com.yahoo.document.predicate.Predicate in project vespa by vespa-engine.
the class PredicateFieldValueTest method requireThatAccessorsWork.
@Test
public void requireThatAccessorsWork() {
PredicateFieldValue value = new PredicateFieldValue();
Predicate predicate = SimplePredicates.newPredicate();
value.setPredicate(predicate);
assertSame(predicate, value.getPredicate());
}
Aggregations