1
2
3
4 package org.melati.poem.util.test;
5
6 import java.util.NoSuchElementException;
7
8 import org.melati.poem.util.LongEnumeration;
9
10 import junit.framework.TestCase;
11
12
13
14
15
16
17 public class LongEnumerationTest extends TestCase {
18
19
20
21
22 public LongEnumerationTest(String name) {
23 super(name);
24 }
25
26
27
28
29
30 protected void setUp() throws Exception {
31 super.setUp();
32 }
33
34
35
36
37
38 protected void tearDown() throws Exception {
39 super.tearDown();
40 }
41
42
43
44
45 public void testLongEnumeration() {
46
47 }
48
49
50
51
52 public void testHasMoreElements() {
53
54 }
55
56
57
58
59 public void testNextElement() {
60 LongEnumeration l = new LongEnumeration(2,5);
61 assertEquals(new Long(2),l.nextElement());
62 assertEquals(new Long(3),l.nextElement());
63 assertEquals(new Long(4),l.nextElement());
64 try {
65 assertEquals(new Long(5),l.nextElement());
66 fail("Should have blown up");
67 } catch (NoSuchElementException e) {
68 e = null;
69 }
70
71 }
72
73 }