mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-14 20:42:21 +00:00
Use native Java functionality rather than Guava's Lists#newArrayList, Maps#newHashMap, and Sets#newHashSet where possible
This commit is contained in:
1 parent
1648295304
commit
7fb2511ee8
9 files changed
+23
-29
No files matched your search
@@ -31,9 +31,10 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.containsInAnyOrder;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
@@ -141,7 +142,7 @@ public class EnvVarsTest {
|
||||
OverrideOrderCalculator calc = new OverrideOrderCalculator(env, overrides);
|
||||
List<String> order = calc.getOrderedVariableNames();
|
||||
assertEquals(Arrays.asList("B", "A", "C"), order.subList(0, 3));
|
||||
assertEquals(Sets.newHashSet("E", "D"), new HashSet<>(order.subList(3, order.size())));
|
||||
assertThat(new HashSet<>(order.subList(3, order.size())), containsInAnyOrder("E", "D"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in new issue
Block a user