Search in sources :

Example 6 with XCardValue

use of ezvcard.io.xml.XCardElement.XCardValue in project ez-vcard by mangstadt.

the class XCardElementTest method firstValue_namespace.

@Test
public void firstValue_namespace() {
    XCardElement xcardElement = build("<prop><n:foo xmlns:n=\"http://example.com\">one</n:foo><text>two</text></prop>");
    XCardValue child = xcardElement.firstValue();
    assertEquals(VCardDataType.TEXT, child.getDataType());
    assertEquals("two", child.getValue());
}
Also used : XCardValue(ezvcard.io.xml.XCardElement.XCardValue) Test(org.junit.Test)

Aggregations

XCardValue (ezvcard.io.xml.XCardElement.XCardValue)6 Test (org.junit.Test)4 VCardDataType (ezvcard.VCardDataType)2 RawProperty (ezvcard.property.RawProperty)1