Examples of ExtendedParamType


Examples of net.sourceforge.cardme.vcard.types.params.ExtendedParamType

  @Test
  public void testEquals() throws URISyntaxException {
    ImppType imppType4 = new ImppType("im:alice@example.com");
    imppType4.addParam(ImppParamType.WORK);
    imppType4.addParam(ImppParamType.PREF);
    imppType4.addExtendedParam(new ExtendedParamType("X-PARAM-1", "Something extra", VCardTypeName.IMPP));
    imppType4.addExtendedParam(new ExtendedParamType("X-PARAM-2", VCardTypeName.IMPP));
   
    assertTrue(imppType1.equals(imppType4));
  }
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.params.ExtendedParamType

  @Test
  public void testCompareTo() throws URISyntaxException {
    ImppType imppType4 = new ImppType("im:alice@example.com");
    imppType4.addParam(ImppParamType.WORK);
    imppType4.addParam(ImppParamType.PREF);
    imppType4.addExtendedParam(new ExtendedParamType("X-PARAM-1", "Something extra", VCardTypeName.IMPP));
    imppType4.addExtendedParam(new ExtendedParamType("X-PARAM-2", VCardTypeName.IMPP));
   
    assertTrue(imppType1.compareTo(imppType4) == 0);
  }
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.params.ExtendedParamType

  @Test
  public void testHashcode() throws URISyntaxException {
    ImppType imppType4 = new ImppType("im:alice@example.com");
    imppType4.addParam(ImppParamType.WORK);
    imppType4.addParam(ImppParamType.PREF);
    imppType4.addExtendedParam(new ExtendedParamType("X-PARAM-1", "Something extra", VCardTypeName.IMPP));
    imppType4.addExtendedParam(new ExtendedParamType("X-PARAM-2", VCardTypeName.IMPP));
   
    int hcode1 = imppType1.hashCode();
    int hcode2 = imppType4.hashCode();
    assertEquals(hcode1, hcode2);
  }
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.params.ExtendedParamType

  @Before
  public void setUp() throws Exception {
    urlType1 = new UrlType("http://sourceforge.net");
    urlType1.addParam(UrlParamType.WORK)
      .addParam(UrlParamType.PREF)
      .addExtendedParam(new ExtendedParamType("X-PROTOCOL", "HTTPS", VCardTypeName.URL))
      .addExtendedParam(new ExtendedParamType("X-SSL", VCardTypeName.URL));
   
    urlType2 = new UrlType(new URL("http://sourceforge.net"));
    urlType3 = new UrlType();
    urlType4 = new UrlType("this should be ok.");
  }
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.params.ExtendedParamType

    assertTrue(urlType1.containsAllParams(types));
  }
 
  @Test
  public void testContainsExtendedParam() {
    assertTrue(urlType1.containsExtendedParam(new ExtendedParamType("X-PROTOCOL", "HTTPS", VCardTypeName.URL)));
    assertTrue(urlType1.containsExtendedParam(new ExtendedParamType("X-SSL", VCardTypeName.URL)));
    assertFalse(urlType1.containsExtendedParam(new ExtendedParamType("X-NOT-EXISTS", VCardTypeName.URL)));
  }
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.params.ExtendedParamType

  }
 
  @Test
  public void testContainsAllExtendedParams() {
    List<ExtendedParamType> types = new ArrayList<ExtendedParamType>(2);
    types.add(new ExtendedParamType("X-PROTOCOL", "HTTPS", VCardTypeName.URL));
    types.add(new ExtendedParamType("X-SSL", VCardTypeName.URL));
   
    assertTrue(urlType1.containsAllExtendedParams(types));
  }
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.params.ExtendedParamType

    assertFalse(urlType1.containsParam(UrlParamType.HOME));
  }
 
  @Test
  public void testRemoveExtendedParam() {
    urlType1.addExtendedParam(new ExtendedParamType("X-REMOVEME", VCardTypeName.URL));
    assertTrue(urlType1.containsExtendedParam(new ExtendedParamType("X-REMOVEME", VCardTypeName.URL)));
    urlType1.removeExtendedParam(new ExtendedParamType("X-REMOVEME", VCardTypeName.URL));
    assertFalse(urlType1.containsExtendedParam(new ExtendedParamType("X-REMOVEME", VCardTypeName.URL)));
  }
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.params.ExtendedParamType

  @Test
  public void testEquals() {
    UrlType urlType5 = new UrlType("http://sourceforge.net");
    urlType5.addParam(UrlParamType.WORK)
      .addParam(UrlParamType.PREF)
      .addExtendedParam(new ExtendedParamType("X-PROTOCOL", "HTTPS", VCardTypeName.URL))
      .addExtendedParam(new ExtendedParamType("X-SSL", VCardTypeName.URL));
   
    assertTrue(urlType1.equals(urlType5));
  }
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.params.ExtendedParamType

  @Test
  public void testHashcode() {
    UrlType urlType5 = new UrlType("http://sourceforge.net");
    urlType5.addParam(UrlParamType.WORK)
      .addParam(UrlParamType.PREF)
      .addExtendedParam(new ExtendedParamType("X-PROTOCOL", "HTTPS", VCardTypeName.URL))
      .addExtendedParam(new ExtendedParamType("X-SSL", VCardTypeName.URL));
   
    int hcode1 = urlType1.hashCode();
    int hcode2 = urlType5.hashCode();
    assertEquals(hcode1, hcode2);
  }
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.params.ExtendedParamType

  @Test
  public void testCompareTo() {
    UrlType urlType5 = new UrlType("http://sourceforge.net");
    urlType5.addParam(UrlParamType.WORK)
      .addParam(UrlParamType.PREF)
      .addExtendedParam(new ExtendedParamType("X-PROTOCOL", "HTTPS", VCardTypeName.URL))
      .addExtendedParam(new ExtendedParamType("X-SSL", VCardTypeName.URL));
   
    assertTrue(urlType1.compareTo(urlType5) == 0);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.