01: /*
02: * Copyright (C) 2004 Joe Walnes.
03: * Copyright (C) 2006, 2007 XStream Committers.
04: * All rights reserved.
05: *
06: * The software in this package is published under the terms of the BSD
07: * style license a copy of which has been included with this distribution in
08: * the LICENSE.txt file.
09: *
10: * Created on 25. March 2004 by Joe Walnes
11: */
12: package com.thoughtworks.xstream.converters.basic;
13:
14: import com.thoughtworks.acceptance.AbstractAcceptanceTest;
15:
16: import java.net.MalformedURLException;
17: import java.net.URL;
18:
19: public class URLConverterTest extends AbstractAcceptanceTest {
20:
21: public void testConvertsToSingleString()
22: throws MalformedURLException {
23:
24: assertBothWays(new URL(
25: "http://www.apple.com:2020/path/blah.html?abc#2"),
26: "<url>http://www.apple.com:2020/path/blah.html?abc#2</url>");
27:
28: assertBothWays(new URL("file:/c:/winnt/blah.txt"),
29: "<url>file:/c:/winnt/blah.txt</url>");
30: }
31:
32: }
|