瀏覽代碼

custom-set: update tests to 1.1.0

Samuel Warner 8 年之前
父節點
當前提交
ccf577e49d
共有 2 個文件被更改,包括 9 次插入1 次删除
  1. 1
    1
      exercises/custom-set/.meta/version
  2. 8
    0
      exercises/custom-set/src/test/java/CustomSetTest.java

+ 1
- 1
exercises/custom-set/.meta/version 查看文件

@@ -1 +1 @@
1
-1.0.1
1
+1.1.0

+ 8
- 0
exercises/custom-set/src/test/java/CustomSetTest.java 查看文件

@@ -172,6 +172,14 @@ public class CustomSetTest {
172 172
 
173 173
     @Ignore("Remove to run test")
174 174
     @Test
175
+    public void setIsNotEqualToLargerSetWithSameElements() {
176
+        CustomSet<String> customSet = new CustomSet<>(Arrays.asList("1", "2", "3"));
177
+        CustomSet<String> secondCustomSet = new CustomSet<>(Arrays.asList("1", "2", "3", "4"));
178
+        assertFalse(customSet.equals(secondCustomSet));
179
+    }
180
+
181
+    @Ignore("Remove to run test")
182
+    @Test
175 183
     public void addToEmptySet() {
176 184
         int element = 3;
177 185
         CustomSet<Integer> expected = new CustomSet<>(Collections.unmodifiableList(Collections.singletonList(element)));