1   /*
2    * Copyright 2001-2004 (C) MetaStuff, Ltd. All Rights Reserved.
3    * 
4    * This software is open source. 
5    * See the bottom of this file for the licence.
6    * 
7    * $Id: TestBeans.java,v 1.2 2004/06/25 08:03:47 maartenc Exp $
8    */
9   
10  package org.dom4j.bean;
11  
12  import java.net.URL;
13  import junit.framework.Test;
14  import junit.framework.TestSuite;
15  import junit.textui.TestRunner;
16  import org.dom4j.AbstractTestCase;
17  import org.dom4j.io.SAXReader;
18  
19  /*** 
20    *
21    * @author <a href="mailto:maartenc@users.sourceforge.net">Maarten Coene</a>
22    */
23  public class TestBeans extends AbstractTestCase {
24  
25      public static void main( String[] args ) {
26          TestRunner.run( suite() );
27      }
28      
29      public static Test suite() {
30          return new TestSuite( TestBeans.class );
31      }
32      
33      public TestBeans(String name) {
34          super(name);
35      }
36  
37      // Test case(s)
38      //-------------------------------------------------------------------------                    
39      public void testReadXML() throws Exception {
40          URL url = getClass().getResource("/xml/bean/gui.xml");
41          SAXReader reader = new SAXReader( BeanDocumentFactory.getInstance() );
42          reader.read(url);
43      }
44      
45  }
46  
47  
48  
49  
50  /*
51   * Redistribution and use of this software and associated documentation
52   * ("Software"), with or without modification, are permitted provided
53   * that the following conditions are met:
54   *
55   * 1. Redistributions of source code must retain copyright
56   *    statements and notices.  Redistributions must also contain a
57   *    copy of this document.
58   *
59   * 2. Redistributions in binary form must reproduce the
60   *    above copyright notice, this list of conditions and the
61   *    following disclaimer in the documentation and/or other
62   *    materials provided with the distribution.
63   *
64   * 3. The name "DOM4J" must not be used to endorse or promote
65   *    products derived from this Software without prior written
66   *    permission of MetaStuff, Ltd.  For written permission,
67   *    please contact dom4j-info@metastuff.com.
68   *
69   * 4. Products derived from this Software may not be called "DOM4J"
70   *    nor may "DOM4J" appear in their names without prior written
71   *    permission of MetaStuff, Ltd. DOM4J is a registered
72   *    trademark of MetaStuff, Ltd.
73   *
74   * 5. Due credit should be given to the DOM4J Project - 
75   *    http://dom4j.org/
76   *
77   * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS
78   * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
79   * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
80   * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
81   * METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
82   * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
83   * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
84   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
85   * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
86   * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
87   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
88   * OF THE POSSIBILITY OF SUCH DAMAGE.
89   *
90   * Copyright 2001-2004 (C) MetaStuff, Ltd. All Rights Reserved.
91   *
92   * $Id: TestBeans.java,v 1.2 2004/06/25 08:03:47 maartenc Exp $
93   */