Package net.sourceforge.cardme.vcard

Examples of net.sourceforge.cardme.vcard.VCardImpl


    assertTrue(vcardStr.contains("PROFILE:VCard\r\n"));
  }
 
  @Test
  public void testBuildSourceType() throws VCardBuildException {
    VCardImpl vcard = getSimpleVCard();
    vcard.setSource(new SourceType("Whatever"));
   
    VCardWriter vcardWriter = new VCardWriter();
    vcardWriter.setOutputVersion(VCardVersion.V3_0);
    vcardWriter.setCompatibilityMode(CompatibilityMode.RFC2426);
    vcardWriter.setFoldingScheme(FoldingScheme.MIME_DIR);
View Full Code Here


    assertTrue(vcardStr.contains("SOURCE:Whatever\r\n"));
  }
 
  @Test
  public void testBuildTitleType() throws VCardBuildException {
    VCardImpl vcard = getSimpleVCard();
    vcard.setTitle(new TitleType("Generic Accountant"));
   
    VCardWriter vcardWriter = new VCardWriter();
    vcardWriter.setOutputVersion(VCardVersion.V3_0);
    vcardWriter.setCompatibilityMode(CompatibilityMode.RFC2426);
    vcardWriter.setFoldingScheme(FoldingScheme.MIME_DIR);
View Full Code Here

    assertTrue(vcardStr.contains("TITLE:Generic Accountant\r\n"));
  }
 
  @Test
  public void testBuildRoleType() throws VCardBuildException {
    VCardImpl vcard = getSimpleVCard();
    vcard.setRole(new RoleType("Counting Money"));
   
    VCardWriter vcardWriter = new VCardWriter();
    vcardWriter.setOutputVersion(VCardVersion.V3_0);
    vcardWriter.setCompatibilityMode(CompatibilityMode.RFC2426);
    vcardWriter.setFoldingScheme(FoldingScheme.MIME_DIR);
View Full Code Here

    assertTrue(vcardStr.contains("ROLE:Counting Money\r\n"));
  }
 
  @Test
  public void testBuildGeoType() throws VCardBuildException {
    VCardImpl vcard = getSimpleVCard();
    vcard.setGeo(new GeoType(-2.6d, 3.4d));
   
    VCardWriter vcardWriter = new VCardWriter();
    vcardWriter.setOutputVersion(VCardVersion.V3_0);
    vcardWriter.setCompatibilityMode(CompatibilityMode.RFC2426);
    vcardWriter.setFoldingScheme(FoldingScheme.MIME_DIR);
View Full Code Here

    assertTrue(vcardStr.contains("GEO:3.400000;-2.600000\r\n"));
  }
 
  @Test
  public void testBuildOrgType() throws VCardBuildException {
    VCardImpl vcard = getSimpleVCard();
    vcard.setOrg(new OrgType().setOrgName("IBM").addOrgUnit("Dev"));
   
    VCardWriter vcardWriter = new VCardWriter();
    vcardWriter.setOutputVersion(VCardVersion.V3_0);
    vcardWriter.setCompatibilityMode(CompatibilityMode.RFC2426);
    vcardWriter.setFoldingScheme(FoldingScheme.MIME_DIR);
View Full Code Here

    assertTrue(vcardStr.contains("ORG:IBM;Dev\r\n"));
  }
 
  @Test
  public void testBuildMailerFeature() throws VCardBuildException {
    VCardImpl vcard = getSimpleVCard();
    vcard.setMailer(new MailerType("Mozilla Thunderbird"));
   
    VCardWriter vcardWriter = new VCardWriter();
    vcardWriter.setOutputVersion(VCardVersion.V3_0);
    vcardWriter.setCompatibilityMode(CompatibilityMode.RFC2426);
    vcardWriter.setFoldingScheme(FoldingScheme.MIME_DIR);
View Full Code Here

  @Test
  public void testBuildTzTypeUTC_OFFSET() throws VCardBuildException {
    TzType tz = new TzType(TimeZone.getTimeZone("Asia/Beirut"));
    tz.setParamType(TzParamType.UTC_OFFSET);
   
    VCardImpl vcard = getSimpleVCard();
    vcard.setTz(tz);
   
    VCardWriter vcardWriter = new VCardWriter();
    vcardWriter.setOutputVersion(VCardVersion.V3_0);
    vcardWriter.setCompatibilityMode(CompatibilityMode.RFC2426);
    vcardWriter.setFoldingScheme(FoldingScheme.MIME_DIR);
View Full Code Here

  @Test
  public void testBuildTzType_TEXT() throws VCardBuildException {
    TzType tz = new TzType(TimeZone.getTimeZone("Asia/Beirut"));
    tz.setParamType(TzParamType.TEXT);
   
    VCardImpl vcard = getSimpleVCard();
    vcard.setTz(tz);
   
    VCardWriter vcardWriter = new VCardWriter();
    vcardWriter.setOutputVersion(VCardVersion.V3_0);
    vcardWriter.setCompatibilityMode(CompatibilityMode.RFC2426);
    vcardWriter.setFoldingScheme(FoldingScheme.MIME_DIR);
View Full Code Here

    assertTrue(vcardStr.contains("TZ;VALUE=TEXT:+02:00;;Eastern European Time\r\n"));
  }
 
  @Test
  public void testBuildUrlType() throws VCardBuildException {
    VCardImpl vcard = getSimpleVCard();
    vcard.addUrl(new UrlType("http://www.sun.com"));
    vcard.addUrl(new UrlType("this is free form text."));
   
    VCardWriter vcardWriter = new VCardWriter();
    vcardWriter.setOutputVersion(VCardVersion.V3_0);
    vcardWriter.setCompatibilityMode(CompatibilityMode.RFC2426);
    vcardWriter.setFoldingScheme(FoldingScheme.MIME_DIR);
View Full Code Here

    rev.set(Calendar.DAY_OF_MONTH, 22);
    rev.set(Calendar.HOUR_OF_DAY, 14);
    rev.set(Calendar.MINUTE, 30);
    rev.set(Calendar.SECOND, 5);
   
    VCardImpl vcard = getSimpleVCard();
    vcard.setRev(new RevType(rev));
   
    VCardWriter vcardWriter = new VCardWriter();
    vcardWriter.setOutputVersion(VCardVersion.V3_0);
    vcardWriter.setCompatibilityMode(CompatibilityMode.RFC2426);
    vcardWriter.setFoldingScheme(FoldingScheme.MIME_DIR);
View Full Code Here

TOP

Related Classes of net.sourceforge.cardme.vcard.VCardImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.