diff options
author | Alexander Kurtakov | 2020-01-30 18:09:03 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2020-01-30 18:09:03 +0000 |
commit | e052381f77c5c51193509ae837400d269c892270 (patch) | |
tree | 104e7609478cd0e4e1fde6d583da642f56b469f8 | |
parent | dbcf5bf2ef973a64ab777e19510468d0206e9516 (diff) | |
download | rt.equinox.p2-e052381f77c5c51193509ae837400d269c892270.tar.gz rt.equinox.p2-e052381f77c5c51193509ae837400d269c892270.tar.xz rt.equinox.p2-e052381f77c5c51193509ae837400d269c892270.zip |
Move away of junit Assert.assertThat
Use Hamcrest MatcherAssert.assertThat instead.
Change-Id: I70178cd178e4730b24925c0ceaa6b50f86f4ffb6
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
9 files changed, 39 insertions, 17 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ActionTest.java index 6ee4cf48a..462bcd15a 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ActionTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ActionTest.java @@ -17,7 +17,7 @@ package org.eclipse.equinox.p2.tests.publisher.actions; import static org.easymock.EasyMock.createMock; import static org.easymock.EasyMock.expect; import static org.easymock.EasyMock.replay; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import java.io.ByteArrayOutputStream; import java.io.File; diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/BundlesActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/BundlesActionTest.java index 8e6acb848..5ffcf38a7 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/BundlesActionTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/BundlesActionTest.java @@ -24,7 +24,7 @@ import static org.eclipse.equinox.p2.tests.publisher.actions.StatusMatchers.stat import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.hasItem; import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import java.io.BufferedInputStream; import java.io.File; diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/JREActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/JREActionTest.java index bc9361464..088b3bd9c 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/JREActionTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/JREActionTest.java @@ -24,7 +24,7 @@ import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.hasItem; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.not; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import java.io.ByteArrayOutputStream; import java.io.File; diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionCapturingTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionCapturingTest.java index 2fd22a1a5..ffddce266 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionCapturingTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionCapturingTest.java @@ -16,10 +16,14 @@ ******************************************************************************/ package org.eclipse.equinox.p2.tests.publisher.actions; -import static org.easymock.EasyMock.*; +import static org.easymock.EasyMock.anyBoolean; +import static org.easymock.EasyMock.anyObject; +import static org.easymock.EasyMock.createNiceMock; +import static org.easymock.EasyMock.expect; +import static org.easymock.EasyMock.expectLastCall; import static org.eclipse.equinox.p2.tests.publisher.actions.StatusMatchers.okStatus; import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import java.io.File; import java.util.Collections; @@ -32,7 +36,10 @@ import org.eclipse.equinox.p2.metadata.Version; import org.eclipse.equinox.p2.publisher.IPublisherAdvice; import org.eclipse.equinox.p2.publisher.IPublisherInfo; import org.eclipse.equinox.p2.publisher.actions.RootIUAdvice; -import org.eclipse.equinox.p2.publisher.eclipse.*; +import org.eclipse.equinox.p2.publisher.eclipse.IConfigAdvice; +import org.eclipse.equinox.p2.publisher.eclipse.IExecutableAdvice; +import org.eclipse.equinox.p2.publisher.eclipse.ProductAction; +import org.eclipse.equinox.p2.publisher.eclipse.ProductFileAdvice; import org.eclipse.equinox.p2.tests.TestData; import org.eclipse.equinox.p2.tests.publisher.TestArtifactRepository; diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTest.java index f59711b2f..3405c53e5 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTest.java @@ -24,7 +24,7 @@ import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.hasItem; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.not; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import java.io.File; import java.io.IOException; diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTestMac.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTestMac.java index f94770a74..87a455079 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTestMac.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTestMac.java @@ -13,10 +13,14 @@ *******************************************************************************/ package org.eclipse.equinox.p2.tests.publisher.actions; -import static org.easymock.EasyMock.*; +import static org.easymock.EasyMock.anyBoolean; +import static org.easymock.EasyMock.anyObject; +import static org.easymock.EasyMock.createNiceMock; +import static org.easymock.EasyMock.expect; +import static org.easymock.EasyMock.expectLastCall; import static org.eclipse.equinox.p2.tests.publisher.actions.StatusMatchers.okStatus; import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import java.io.File; import java.util.Collections; @@ -25,9 +29,13 @@ import org.easymock.EasyMock; import org.eclipse.core.runtime.IStatus; import org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile; import org.eclipse.equinox.p2.metadata.Version; -import org.eclipse.equinox.p2.publisher.*; +import org.eclipse.equinox.p2.publisher.AbstractPublisherAction; +import org.eclipse.equinox.p2.publisher.IPublisherAdvice; +import org.eclipse.equinox.p2.publisher.IPublisherInfo; import org.eclipse.equinox.p2.publisher.actions.RootIUAdvice; -import org.eclipse.equinox.p2.publisher.eclipse.*; +import org.eclipse.equinox.p2.publisher.eclipse.IExecutableAdvice; +import org.eclipse.equinox.p2.publisher.eclipse.ProductAction; +import org.eclipse.equinox.p2.publisher.eclipse.ProductFileAdvice; import org.eclipse.equinox.p2.tests.TestData; /** diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionWithJRELocationTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionWithJRELocationTest.java index 1971024bc..b6e35da61 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionWithJRELocationTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionWithJRELocationTest.java @@ -16,14 +16,21 @@ package org.eclipse.equinox.p2.tests.publisher.actions; import static org.eclipse.equinox.p2.tests.publisher.actions.StatusMatchers.okStatus; import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import java.io.File; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; import org.eclipse.core.runtime.IStatus; import org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile; -import org.eclipse.equinox.p2.metadata.*; -import org.eclipse.equinox.p2.publisher.*; +import org.eclipse.equinox.p2.metadata.IInstallableUnit; +import org.eclipse.equinox.p2.metadata.IProvidedCapability; +import org.eclipse.equinox.p2.metadata.MetadataFactory; +import org.eclipse.equinox.p2.metadata.Version; +import org.eclipse.equinox.p2.publisher.IPublisherResult; +import org.eclipse.equinox.p2.publisher.PublisherInfo; +import org.eclipse.equinox.p2.publisher.PublisherResult; import org.eclipse.equinox.p2.publisher.eclipse.ProductAction; import org.eclipse.equinox.p2.tests.AbstractProvisioningTest; import org.eclipse.equinox.p2.tests.TestData; diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductContentTypeTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductContentTypeTest.java index 8b5ac9842..14d8c0024 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductContentTypeTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductContentTypeTest.java @@ -16,7 +16,7 @@ package org.eclipse.equinox.p2.tests.publisher.actions; import static org.eclipse.equinox.p2.tests.publisher.actions.StatusMatchers.errorStatus; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.not; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import java.io.File; import java.util.ArrayList; diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductFileTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductFileTest.java index 5ead0e223..9920b0ad4 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductFileTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductFileTest.java @@ -17,7 +17,7 @@ package org.eclipse.equinox.p2.tests.publisher.actions; import static org.eclipse.equinox.p2.tests.AdditionalCoreMatchers.hasSize; import static org.hamcrest.CoreMatchers.hasItem; import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import java.util.List; import java.util.Map; |