Debian Codegraph @

scala-unit-tests/src/test/scala/org/eclipse/collections/impl/set/mutable/SynchronizedMutableSetScalaTest.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.mutable
12
13 import org.eclipse.collections.impl.collection.mutable.SynchronizedMutableCollectionTestTrait
14 import org.eclipse.collections.impl.list.mutable.FastList
15 import org.junit.Test
16
17 class SynchronizedMutableSetScalaTest extends SynchronizedMutableCollectionTestTrait with SynchronizedUnsortedSetIterableTestTrait
18 {
19 val treeSet = new java.util.TreeSet[String](FastList.newListWith[String]("1", "2", "3"))
20 val mutableSet = SetAdapter.adapt(treeSet)
21 val classUnderTest = mutableSet.asSynchronized
22
23 @Test
24 override def equals_synchronized
25 {
26 this.assertSynchronized
27 {
28 this.classUnderTest.equals(null)
29 }
30 }
31
32 @Test
33 override def hashCode_synchronized
34 {
35 this.assertSynchronized
36 {
37 this.classUnderTest.hashCode
38 }
39 }
40 }