View Javadoc
1   /**
2    * 
3    */
4   package org.melati.poem.util.test;
5   
6   import java.util.Enumeration;
7   import java.util.NoSuchElementException;
8   
9   import org.melati.poem.util.EmptyEnumeration;
10  import org.melati.poem.util.FlattenedEnumeration;
11  
12  import junit.framework.TestCase;
13  
14  /**
15   * @author timp
16   * @since 29 May 2007
17   *
18   */
19  public class FlattenedEnumerationTest extends TestCase {
20  
21    /**
22     * @param name
23     */
24    public FlattenedEnumerationTest(String name) {
25      super(name);
26    }
27  
28    /** 
29     * {@inheritDoc}
30     * @see junit.framework.TestCase#setUp()
31     */
32    protected void setUp() throws Exception {
33      super.setUp();
34    }
35  
36    /** 
37     * {@inheritDoc}
38     * @see junit.framework.TestCase#tearDown()
39     */
40    protected void tearDown() throws Exception {
41      super.tearDown();
42    }
43  
44    /**
45     * Test method for {@link org.melati.poem.util.FlattenedEnumeration#FlattenedEnumeration(java.util.Enumeration)}.
46     */
47    public void testFlattenedEnumerationEnumeration() {
48      
49    }
50  
51    /**
52     * Test method for {@link org.melati.poem.util.FlattenedEnumeration#FlattenedEnumeration(java.util.Enumeration, java.util.Enumeration)}.
53     */
54    public void testFlattenedEnumerationEnumerationEnumeration() {
55      
56    }
57  
58    /**
59     * Test method for {@link org.melati.poem.util.FlattenedEnumeration#hasMoreElements()}.
60     */
61    public void testHasMoreElements() {
62      
63    }
64  
65    /**
66     * Test method for {@link org.melati.poem.util.FlattenedEnumeration#nextElement()}.
67     */
68    public void testNextElement() {
69      FlattenedEnumeration<Object> fen = new FlattenedEnumeration<Object>(new EmptyEnumeration<Enumeration<Object>>());
70      try { 
71        fen.nextElement();
72        fail("should have bombed");
73      } catch (NoSuchElementException e) {
74        e = null;      
75      }
76      
77    }
78  
79  }