Search in sources :

Example 21 with Note

use of ezvcard.property.Note in project ez-vcard by mangstadt.

the class VCardTest method removeProperties.

@Test
public void removeProperties() {
    VCard vcard = new VCard();
    assertEquals(asList(), vcard.removeProperties(Note.class));
    Note property1 = new Note("value");
    Note property2 = new Note("value2");
    vcard.addProperty(property1);
    vcard.addProperty(property2);
    assertEquals(asList(property1, property2), vcard.getProperties(Note.class));
    assertEquals(asList(property1, property2), vcard.removeProperties(Note.class));
    assertEquals(asList(), vcard.getProperties(Note.class));
}
Also used : Note(ezvcard.property.Note) Test(org.junit.Test)

Aggregations

Note (ezvcard.property.Note)21 Test (org.junit.Test)18 VCard (ezvcard.VCard)9 VCardAsserter (ezvcard.property.asserter.VCardAsserter)6 FormattedName (ezvcard.property.FormattedName)4 Photo (ezvcard.property.Photo)4 XCardDocumentStreamWriter (ezvcard.io.xml.XCardDocument.XCardDocumentStreamWriter)2 Pid (ezvcard.parameter.Pid)2 Title (ezvcard.property.Title)2 Url (ezvcard.property.Url)2 StringWriter (java.io.StringWriter)2 Document (org.w3c.dom.Document)2 Address (ezvcard.property.Address)1 Agent (ezvcard.property.Agent)1 Categories (ezvcard.property.Categories)1 Email (ezvcard.property.Email)1 FreeBusyUrl (ezvcard.property.FreeBusyUrl)1 Impp (ezvcard.property.Impp)1 Key (ezvcard.property.Key)1 Nickname (ezvcard.property.Nickname)1