URLTypeTest.java :  » JSON » jsonmarshaller » com » twolattes » json » types » Java Open Source

Java Open Source » JSON » jsonmarshaller 
jsonmarshaller » com » twolattes » json » types » URLTypeTest.java
package com.twolattes.json.types;

import static com.twolattes.json.Json.string;
import static org.junit.Assert.assertEquals;

import java.net.URL;

import org.junit.Test;


public class URLTypeTest {
  @Test
  public void testMarshall() throws Exception {
    assertEquals(
        string("http://www.twolattes.com"),
        new URLType().marshall(new URL("http://www.twolattes.com")));
  }

  @Test
  public void testUnmarshall() throws Exception {
    assertEquals(
        new URL("http://www.twolattes.com"),
        new URLType().unmarshall(string("http://www.twolattes.com")));
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.