| 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.collection.mutable |
| 12 |
|
| 13 |
import org.eclipse.collections.api.collection.MutableCollection |
| 14 |
import org.eclipse.collections.impl.InternalIterableTestTrait |
| 15 |
import org.eclipse.collections.impl.test.Verify |
| 16 |
import org.junit.Test |
| 17 |
|
| 18 |
// TODO: change to extend RichIterableTestTrait |
| 19 |
trait MutableCollectionTestTrait extends InternalIterableTestTrait |
| 20 |
{ |
| 21 |
val classUnderTest: MutableCollection[String] |
| 22 |
|
| 23 |
@Test |
| 24 |
def add |
| 25 |
{ |
| 26 |
this.classUnderTest.add("4") |
| 27 |
Verify.assertSize(4, this.classUnderTest) |
| 28 |
Verify.assertContainsAll(this.classUnderTest, "1", "2", "3", "4") |
| 29 |
} |
| 30 |
} |