Debian Codegraph @

scala-unit-tests/src/test/scala/org/eclipse/collections/impl/set/SynchronizedSetIterableTestTrait.scala

raw
1 /*
2 * Copyright (c) 2021 Goldman Sachs.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * and Eclipse Distribution License v. 1.0 which accompany this distribution.
6 * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
7 * and the Eclipse Distribution License is available at
8 * http://www.eclipse.org/org/documents/edl-v10.php.
9 */
10
11 package org.eclipse.collections.impl.set
12
13 import org.eclipse.collections.api.set.SetIterable
14 import org.eclipse.collections.impl.SynchronizedRichIterableTestTrait
15 import org.eclipse.collections.impl.set.sorted.mutable.TreeSortedSet
16 import org.junit.Test
17
18 trait SynchronizedSetIterableTestTrait extends SynchronizedRichIterableTestTrait
19 {
20 val classUnderTest: SetIterable[String]
21
22 @Test
23 def union_synchronized
24 {
25 this.assertSynchronized(this.classUnderTest.union(TreeSortedSet.newSet[String]))
26 }
27
28 @Test
29 def unionInto_synchronized
30 {
31 this.assertSynchronized(this.classUnderTest.unionInto(TreeSortedSet.newSet[String], TreeSortedSet.newSet[String]))
32 }
33
34 @Test
35 def intersect_synchronized
36 {
37 this.assertSynchronized(this.classUnderTest.intersect(TreeSortedSet.newSet[String]))
38 }
39
40 @Test
41 def intersectInto_synchronized
42 {
43 this.assertSynchronized(this.classUnderTest.intersectInto(TreeSortedSet.newSet[String], TreeSortedSet.newSet[String]))
44 }
45
46 @Test
47 def difference_synchronized
48 {
49 this.assertSynchronized(this.classUnderTest.difference(TreeSortedSet.newSet[String]))
50 }
51
52 @Test
53 def differenceInto_synchronized
54 {
55 this.assertSynchronized(this.classUnderTest.differenceInto(TreeSortedSet.newSet[String], TreeSortedSet.newSet[String]))
56 }
57
58 @Test
59 def symmetricDifference_synchronized
60 {
61 this.assertSynchronized(this.classUnderTest.symmetricDifference(TreeSortedSet.newSet[String]))
62 }
63
64 @Test
65 def symmetricDifferenceInto_synchronized
66 {
67 this.assertSynchronized(this.classUnderTest.symmetricDifferenceInto(TreeSortedSet.newSet[String], TreeSortedSet.newSet[String]))
68 }
69
70 @Test
71 def isSubsetOf_synchronized
72 {
73 this.assertSynchronized(this.classUnderTest.isSubsetOf(TreeSortedSet.newSet[String]))
74 }
75
76 @Test
77 def isProperSubsetOf_synchronized
78 {
79 this.assertSynchronized(this.classUnderTest.isProperSubsetOf(TreeSortedSet.newSet[String]))
80 }
81
82 @Test
83 def cartesianProduct_synchronized
84 {
85 this.assertSynchronized(this.classUnderTest.cartesianProduct(TreeSortedSet.newSet[String]))
86 }
87 }