Pārlūkot izejas kodu

Improve test coverage for QueuedLinkedHashSet.

pull/42/head
Greg Holmes 9 gadus atpakaļ
vecāks
revīzija
6971750c0a

+ 6
- 0
test/com/dmdirc/util/collections/QueuedLinkedHashSetTest.java Parādīt failu

@@ -53,6 +53,12 @@ public class QueuedLinkedHashSetTest {
53 53
         set.element();
54 54
     }
55 55
 
56
+    @Test
57
+    public void testElementWhenNotEmpty() {
58
+        set.offer("foo");
59
+        assertEquals("foo", set.element());
60
+    }
61
+
56 62
     @Test(expected = NoSuchElementException.class)
57 63
     public void testRemoveWhenNewlyCreated() {
58 64
         set.remove();

Notiek ielāde…
Atcelt
Saglabāt