瀏覽代碼

Merge pull request #1187 from sjwarner-bp/custom-set-update

custom-set: update tests to 1.1.0
FridaTveit 8 年之前
父節點
當前提交
29e2488e5c
沒有帳戶連結到提交者的電子郵件
共有 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.0.1
1
+1.1.0

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

172
 
172
 
173
     @Ignore("Remove to run test")
173
     @Ignore("Remove to run test")
174
     @Test
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
     public void addToEmptySet() {
183
     public void addToEmptySet() {
176
         int element = 3;
184
         int element = 3;
177
         CustomSet<Integer> expected = new CustomSet<>(Collections.unmodifiableList(Collections.singletonList(element)));
185
         CustomSet<Integer> expected = new CustomSet<>(Collections.unmodifiableList(Collections.singletonList(element)));