|
22 | 22 | import java.time.LocalTime; |
23 | 23 | import java.util.ArrayList; |
24 | 24 | import java.util.Calendar; |
| 25 | +import java.util.Collections; |
25 | 26 | import java.util.Date; |
26 | 27 | import java.util.EnumMap; |
27 | 28 | import java.util.HashMap; |
28 | 29 | import java.util.HashSet; |
| 30 | +import java.util.Hashtable; |
29 | 31 | import java.util.LinkedHashMap; |
30 | 32 | import java.util.LinkedHashSet; |
31 | 33 | import java.util.List; |
32 | 34 | import java.util.Map; |
33 | 35 | import java.util.Optional; |
34 | 36 | import java.util.Set; |
| 37 | +import java.util.Vector; |
35 | 38 | import java.util.function.Consumer; |
36 | 39 | import java.util.function.Function; |
37 | 40 | import java.util.stream.Stream; |
@@ -197,6 +200,16 @@ public static Stream<Arguments> generateData() |
197 | 200 | id -> new ListDaoObject(id, new ArrayList<>(Set.of("1"))), |
198 | 201 | object -> object.getValue().remove("1") |
199 | 202 | ), |
| 203 | + new TestArguments<>( |
| 204 | + ListRepository.class, |
| 205 | + id -> new ListDaoObject(id, new Vector<>(Set.of("1"))), |
| 206 | + object -> object.getValue().remove("1") |
| 207 | + ), |
| 208 | + new TestArguments<>( |
| 209 | + ListRepository.class, |
| 210 | + id -> new ListDaoObject(id, Collections.emptyList()), |
| 211 | + object -> object.setValue(List.of("1")) |
| 212 | + ), |
200 | 213 | new TestArguments<>( |
201 | 214 | LocalDateRepository.class, |
202 | 215 | id -> new LocalDateDaoObject(id, LocalDate.of(2000, 1, 1)), |
@@ -257,6 +270,21 @@ public static Stream<Arguments> generateData() |
257 | 270 | id -> new MapDaoObject(id, new LinkedHashMap<>(Map.of("1", "1", "2", "2"))), |
258 | 271 | set -> set.getValue().put("3", "3") |
259 | 272 | ), |
| 273 | + new TestArguments<>( |
| 274 | + MapRepository.class, |
| 275 | + id -> new MapDaoObject(id, new Hashtable<>()), |
| 276 | + set -> set.getValue().put("1", "1") |
| 277 | + ), |
| 278 | + new TestArguments<>( |
| 279 | + MapRepository.class, |
| 280 | + id -> new MapDaoObject(id, new Hashtable<>(Map.of("1", "1"))), |
| 281 | + set -> set.getValue().put("2", "2") |
| 282 | + ), |
| 283 | + new TestArguments<>( |
| 284 | + MapRepository.class, |
| 285 | + id -> new MapDaoObject(id, new Hashtable<>(Map.of("1", "1", "2", "2"))), |
| 286 | + set -> set.getValue().put("3", "3") |
| 287 | + ), |
260 | 288 | new TestArguments<>( |
261 | 289 | OptionalRepository.class, |
262 | 290 | id -> new OptionalDaoObject(id, Optional.of("1")), |
|
0 commit comments