01: /*
02: * Copyright (C) 2006 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 28. July 2006 by Guilerme Silveira
11: */
12: package com.thoughtworks.xstream.converters.extended;
13:
14: import java.util.regex.Pattern;
15:
16: import com.thoughtworks.acceptance.AbstractAcceptanceTest;
17:
18: public class RegexPatternConverterTest extends AbstractAcceptanceTest {
19:
20: public void testHandlesSimplePattern() {
21: Pattern root = Pattern.compile(".*");
22: String xml = "<java.util.regex.Pattern>\n"
23: + " <pattern>.*</pattern>\n" + " <flags>0</flags>\n"
24: + "</java.util.regex.Pattern>";
25: assertBothWays(root, xml);
26: }
27:
28: }
|