use of com.yahoo.document.serialization.XmlStream 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.serialization.XmlStream in project vespa by vespa-engine.
the class PredicateFieldValueTest method printXml.
private static String printXml(String tag, FieldValue value) {
XmlStream out = new XmlStream();
out.beginTag(tag);
if (value != null) {
value.printXml(out);
}
out.endTag();
return out.toString();
}
Aggregations