Mercurial > hg > release > thermostat-1.2
changeset 1561:7b5d6d7edb9b
Use junit4 API instead of junit3 API everywhere
Reviewed-by: vanaltj
Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2014-November/011679.html
line wrap: on
line diff
--- a/agent/cli/src/test/java/com/redhat/thermostat/agent/cli/impl/ServiceCommandTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/agent/cli/src/test/java/com/redhat/thermostat/agent/cli/impl/ServiceCommandTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -49,9 +49,8 @@ import java.io.PrintStream; import java.util.Collection; -import junit.framework.Assert; - import org.junit.After; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.mockito.invocation.InvocationOnMock;
--- a/agent/cli/src/test/java/com/redhat/thermostat/agent/cli/impl/locale/TranslateTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/agent/cli/src/test/java/com/redhat/thermostat/agent/cli/impl/locale/TranslateTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -40,9 +40,8 @@ import java.util.Locale; import java.util.Properties; -import junit.framework.Assert; - import org.junit.After; +import org.junit.Assert; import org.junit.Before; import org.junit.Test;
--- a/agent/core/src/test/java/com/redhat/thermostat/agent/AgentHelperTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/agent/core/src/test/java/com/redhat/thermostat/agent/AgentHelperTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -40,7 +40,7 @@ import com.redhat.thermostat.storage.model.BackendInformation; import org.junit.Test; -import static junit.framework.Assert.assertEquals; +import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when;
--- a/agent/core/src/test/java/com/redhat/thermostat/agent/config/AgentOptionParserTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/agent/core/src/test/java/com/redhat/thermostat/agent/config/AgentOptionParserTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -40,9 +40,9 @@ import java.io.IOException; import java.util.Properties; -import junit.framework.Assert; import org.junit.AfterClass; +import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test;
--- a/client/swing/src/test/java/com/redhat/thermostat/client/swing/internal/UIResourcesTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/client/swing/src/test/java/com/redhat/thermostat/client/swing/internal/UIResourcesTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -44,9 +44,8 @@ import javax.swing.UIManager; import javax.swing.plaf.basic.BasicLookAndFeel; -import junit.framework.Assert; - import org.junit.AfterClass; +import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test;
--- a/common/core/src/test/java/com/redhat/thermostat/common/MultipleServiceTrackerTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/common/core/src/test/java/com/redhat/thermostat/common/MultipleServiceTrackerTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -38,8 +38,7 @@ import java.util.Map; -import junit.framework.Assert; - +import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith;
--- a/common/core/src/test/java/com/redhat/thermostat/common/model/LongRangeNormalizerTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/common/core/src/test/java/com/redhat/thermostat/common/model/LongRangeNormalizerTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -36,8 +36,7 @@ package com.redhat.thermostat.common.model; -import junit.framework.Assert; - +import org.junit.Assert; import org.junit.Test; import com.redhat.thermostat.common.model.Range;
--- a/config/src/test/java/com/redhat/thermostat/shared/config/internal/CommonPathsImplTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/config/src/test/java/com/redhat/thermostat/shared/config/internal/CommonPathsImplTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -41,9 +41,8 @@ import java.io.File; import java.io.IOException; -import junit.framework.Assert; - import org.junit.After; +import org.junit.Assert; import org.junit.Before; import org.junit.Test;
--- a/killvm/client-swing/src/test/java/com/redhat/thermostat/killvm/client/locale/TranslateTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/killvm/client-swing/src/test/java/com/redhat/thermostat/killvm/client/locale/TranslateTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -40,9 +40,8 @@ import java.util.Locale; import java.util.Properties; -import junit.framework.Assert; - import org.junit.After; +import org.junit.Assert; import org.junit.Before; import org.junit.Test;
--- a/launcher/src/test/java/com/redhat/thermostat/launcher/internal/LocaleResourcesTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/launcher/src/test/java/com/redhat/thermostat/launcher/internal/LocaleResourcesTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -41,7 +41,7 @@ import java.io.IOException; import java.util.Properties; -import junit.framework.Assert; +import org.junit.Assert; import org.junit.Test;
--- a/storage/cli/src/test/java/com/redhat/thermostat/storage/cli/internal/StorageCommandTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/storage/cli/src/test/java/com/redhat/thermostat/storage/cli/internal/StorageCommandTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -47,9 +47,8 @@ import java.util.Properties; import java.util.concurrent.CountDownLatch; -import junit.framework.Assert; - import org.junit.After; +import org.junit.Assert; import org.junit.Before; import org.junit.Test;
--- a/thread/client-swing/src/test/java/com/redhat/thermostat/thread/client/swing/impl/timeline/TimelineRangeModelFormatterTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/thread/client-swing/src/test/java/com/redhat/thermostat/thread/client/swing/impl/timeline/TimelineRangeModelFormatterTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -42,7 +42,7 @@ import org.junit.BeforeClass; import org.junit.Test; -import static junit.framework.Assert.assertEquals; +import static org.junit.Assert.assertEquals; public class TimelineRangeModelFormatterTest {
--- a/thread/collector/src/test/java/com/redhat/thermostat/thread/dao/impl/ThreadDaoCategoriesTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/thread/collector/src/test/java/com/redhat/thermostat/thread/dao/impl/ThreadDaoCategoriesTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -46,8 +46,8 @@ import java.util.Set; import org.junit.Test; -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertTrue; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify;
--- a/thread/collector/src/test/java/com/redhat/thermostat/thread/dao/impl/statement/SessionQueryTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/thread/collector/src/test/java/com/redhat/thermostat/thread/dao/impl/statement/SessionQueryTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -42,8 +42,8 @@ import java.util.Set; import org.junit.Test; -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertTrue; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; public class SessionQueryTest {
--- a/thread/collector/src/test/java/com/redhat/thermostat/thread/dao/impl/statement/SummaryQueryTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/thread/collector/src/test/java/com/redhat/thermostat/thread/dao/impl/statement/SummaryQueryTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -42,8 +42,8 @@ import java.util.Set; import org.junit.Test; -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertTrue; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; public class SummaryQueryTest { @Test
--- a/thread/collector/src/test/java/com/redhat/thermostat/thread/model/ThreadHeaderTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/thread/collector/src/test/java/com/redhat/thermostat/thread/model/ThreadHeaderTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -38,8 +38,8 @@ import org.junit.Test; -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertFalse; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; public class ThreadHeaderTest {
--- a/thread/collector/src/test/java/com/redhat/thermostat/thread/model/ThreadPojoTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/thread/collector/src/test/java/com/redhat/thermostat/thread/model/ThreadPojoTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -38,8 +38,8 @@ import org.junit.Test; -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertFalse; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; public class ThreadPojoTest {
--- a/thread/collector/src/test/java/com/redhat/thermostat/thread/model/ThreadStateTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/thread/collector/src/test/java/com/redhat/thermostat/thread/model/ThreadStateTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -38,8 +38,8 @@ import org.junit.Test; -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertFalse; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; public class ThreadStateTest {
--- a/thread/harvester/src/test/java/com/redhat/thermostat/thread/harvester/DeadlockHelperTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/thread/harvester/src/test/java/com/redhat/thermostat/thread/harvester/DeadlockHelperTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -46,7 +46,7 @@ import org.junit.Test; import org.mockito.ArgumentCaptor; -import static junit.framework.Assert.assertEquals; +import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when;
--- a/thread/harvester/src/test/java/com/redhat/thermostat/thread/harvester/HarvesterTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/thread/harvester/src/test/java/com/redhat/thermostat/thread/harvester/HarvesterTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -50,10 +50,10 @@ import org.junit.Test; import org.mockito.ArgumentCaptor; -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertFalse; -import static junit.framework.Assert.assertNotNull; -import static junit.framework.Assert.assertTrue; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyLong; import static org.mockito.Matchers.eq;
--- a/unix-process-handler/src/test/java/com/redhat/thermostat/service/process/UnixProcessUtilitiesTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/unix-process-handler/src/test/java/com/redhat/thermostat/service/process/UnixProcessUtilitiesTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -42,8 +42,7 @@ import java.util.ArrayList; import java.util.List; -import junit.framework.Assert; - +import org.junit.Assert; import org.junit.Before; import org.junit.Test;
--- a/vm-heap-analysis/client-swing/src/test/java/com/redhat/thermostat/vm/heap/analysis/client/swing/internal/HeapDumpListViewTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/vm-heap-analysis/client-swing/src/test/java/com/redhat/thermostat/vm/heap/analysis/client/swing/internal/HeapDumpListViewTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -36,8 +36,8 @@ package com.redhat.thermostat.vm.heap.analysis.client.swing.internal; -import static junit.framework.Assert.assertEquals; -import static junit.framework.TestCase.assertTrue; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when;
--- a/vm-heap-analysis/command/src/test/java/com/redhat/thermostat/vm/heap/analysis/command/internal/DumpHeapHelperTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/vm-heap-analysis/command/src/test/java/com/redhat/thermostat/vm/heap/analysis/command/internal/DumpHeapHelperTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -45,8 +45,6 @@ import java.net.InetSocketAddress; import java.util.Collection; -import junit.framework.AssertionFailedError; - import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -159,7 +157,7 @@ try { Class.forName(receiver); } catch (ClassNotFoundException e) { - throw new AssertionFailedError(); + throw new AssertionError(); } }
--- a/vm-memory/client-core/src/test/java/com/redhat/thermostat/vm/memory/client/core/RangeModelTest.java Wed Nov 19 14:08:44 2014 -0500 +++ b/vm-memory/client-core/src/test/java/com/redhat/thermostat/vm/memory/client/core/RangeModelTest.java Fri Nov 21 11:02:34 2014 -0500 @@ -36,8 +36,7 @@ package com.redhat.thermostat.vm.memory.client.core; -import junit.framework.Assert; - +import org.junit.Assert; import org.junit.Test; public class RangeModelTest {