use of org.eclipse.xtend.core.conversion.RichTextValueConverter in project xtext-xtend by eclipse.
the class RichTextValueConverterTest method testRichText.
@Test
public void testRichText() {
String text = "''' foobar '''";
String expectation = " foobar ";
RichTextValueConverter converter = get(RichTextValueConverter.class);
String value = converter.toValue(text, null);
assertEquals(expectation, value);
}
use of org.eclipse.xtend.core.conversion.RichTextValueConverter in project xtext-xtend by eclipse.
the class RichTextValueConverterTest method doTestIncompleteRichString.
protected void doTestIncompleteRichString(String text, String expectation) {
RichTextValueConverter converter = get(RichTextValueConverter.class);
try {
converter.toValue(text, null);
fail("Expected ValueConverterWithValueException");
} catch (ValueConverterWithValueException e) {
String value = (String) e.getValue();
assertEquals(expectation, value);
}
}
Aggregations