FinderRecursivePanel tests: light, cleanup

This commit is contained in:
Yann Cébron
2015-06-23 16:10:15 +02:00
parent b9f17dbf08
commit c5aa36e65a
2 changed files with 9 additions and 7 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2013 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,9 +15,10 @@
*/
package com.intellij.ui;
import com.intellij.testFramework.PlatformTestCase;
import com.intellij.testFramework.LightPlatformTestCase;
import com.intellij.testFramework.SkipInHeadlessEnvironment;
import com.intellij.ui.components.JBList;
import com.intellij.util.ArrayUtil;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
@@ -27,14 +28,14 @@ import java.util.Arrays;
import java.util.List;
@SkipInHeadlessEnvironment
public class FinderRecursivePanelListModelMergeTest extends PlatformTestCase {
public class FinderRecursivePanelListModelMergeTest extends LightPlatformTestCase {
public void testSelectionKeptSingleItem() {
assertMerge(new String[]{"a", "b", "c", "d"}, 0, 0, "a");
}
public void testNoSelectionAfterReplacingAllItems() {
assertMerge(new String[0], "a", "b", "c", "d");
assertMerge(ArrayUtil.EMPTY_STRING_ARRAY, "a", "b", "c", "d");
}
public void testNoSelectionNoItems() {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
package com.intellij.ui;
import com.intellij.openapi.project.Project;
import com.intellij.testFramework.PlatformTestCase;
import com.intellij.testFramework.LightPlatformTestCase;
import com.intellij.testFramework.SkipInHeadlessEnvironment;
import com.intellij.ui.components.JBList;
import org.jetbrains.annotations.NotNull;
@@ -27,7 +27,7 @@ import java.util.Arrays;
import java.util.List;
@SkipInHeadlessEnvironment
public class FinderRecursivePanelSelectionUpdateTest extends PlatformTestCase {
public class FinderRecursivePanelSelectionUpdateTest extends LightPlatformTestCase {
public void testUpdate() throws InterruptedException {
StringFinderRecursivePanel panel_0 = new StringFinderRecursivePanel(getProject());
@@ -57,6 +57,7 @@ public class FinderRecursivePanelSelectionUpdateTest extends PlatformTestCase {
}
@SuppressWarnings("InnerClassMayBeStatic")
private class StringFinderRecursivePanel extends FinderRecursivePanel<String> {
private JBList myList;