-
Notifications
You must be signed in to change notification settings - Fork 583
/
ParallelListIterableTest.java
42 lines (36 loc) · 1.46 KB
/
ParallelListIterableTest.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* Copyright (c) 2021 Goldman Sachs.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v. 1.0 which accompany this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*/
package org.eclipse.collections.impl.lazy.parallel.list;
import org.eclipse.collections.api.list.ParallelListIterable;
import org.eclipse.collections.impl.list.mutable.FastList;
import org.junit.Test;
public class ParallelListIterableTest extends ParallelListIterableTestCase
{
@Override
protected ParallelListIterable<Integer> classUnderTest()
{
return this.newWith(1, 2, 2, 3, 3, 3, 4, 4, 4, 4);
}
@Override
protected ParallelListIterable<Integer> newWith(Integer... littleElements)
{
return FastList.newListWith(littleElements).asParallel(this.executorService, this.batchSize);
}
@Test(expected = IllegalArgumentException.class)
public void asParallel_small_batch()
{
FastList.newListWith(1, 2, 2, 3, 3, 3, 4, 4, 4, 4).asParallel(this.executorService, 0);
}
@Test(expected = NullPointerException.class)
public void asParallel_null_executorService()
{
FastList.newListWith(1, 2, 2, 3, 3, 3, 4, 4, 4, 4).asParallel(null, 2);
}
}