Package net.buffalo.protocal.converters.basic

Examples of net.buffalo.protocal.converters.basic.StringConverter.canConvert()


  }
 
  public void testShouldOutputString() {
    StringConverter serializer = new StringConverter();
    assertEquals("<string>hello, world</string>", marshal(serializer, "hello, world"));
    assertTrue(serializer.canConvert(String.class));
    assertFalse(serializer.canConvert(null));
  }
 
  public void testShouldEscapeXmlString() {
    StringConverter serializer = new StringConverter();
View Full Code Here


 
  public void testShouldOutputString() {
    StringConverter serializer = new StringConverter();
    assertEquals("<string>hello, world</string>", marshal(serializer, "hello, world"));
    assertTrue(serializer.canConvert(String.class));
    assertFalse(serializer.canConvert(null));
  }
 
  public void testShouldEscapeXmlString() {
    StringConverter serializer = new StringConverter();
    assertEquals("<string>a&gt;b; c&lt;d; &amp;this</string>", marshal(serializer, "a>b; c<d; &this"));
View Full Code Here

  }
 
  public void testShouldEscapeXmlString() {
    StringConverter serializer = new StringConverter();
    assertEquals("<string>a&gt;b; c&lt;d; &amp;this</string>", marshal(serializer, "a>b; c<d; &this"));
    assertTrue(serializer.canConvert(String.class));
    assertFalse(serializer.canConvert(null));
  }
 
  public void testShouldOutputCharacterAsString() throws Exception {
    StringConverter serializer = new StringConverter();
View Full Code Here

 
  public void testShouldEscapeXmlString() {
    StringConverter serializer = new StringConverter();
    assertEquals("<string>a&gt;b; c&lt;d; &amp;this</string>", marshal(serializer, "a>b; c<d; &this"));
    assertTrue(serializer.canConvert(String.class));
    assertFalse(serializer.canConvert(null));
  }
 
  public void testShouldOutputCharacterAsString() throws Exception {
    StringConverter serializer = new StringConverter();
    Character character = new Character('c');
View Full Code Here

  }
 
  public void testShouldOutputCharacterAsString() throws Exception {
    StringConverter serializer = new StringConverter();
    Character character = new Character('c');
    assertTrue(serializer.canConvert(Character.class));
    assertEquals("<string>c</string>", marshal(serializer, character));
  }
 
  public void testCanOutputDate() throws Exception {
    DateConverter ds = new DateConverter();
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.