Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMykola Nikishov2017-01-28 03:05:42 -0500
committerStefan Xenos2017-02-08 15:10:07 -0500
commite91df1a8adcba0b6ddfe39ce0ceb579421be38c2 (patch)
treeb9d53bf436d689299595c116c56abffcf92e1624
parent5cde01389ab7e39b3cb4bbb68b3d8e2ecb2d3ebd (diff)
downloadrt.equinox.p2-e91df1a8adcba0b6ddfe39ce0ceb579421be38c2.tar.gz
rt.equinox.p2-e91df1a8adcba0b6ddfe39ce0ceb579421be38c2.tar.xz
rt.equinox.p2-e91df1a8adcba0b6ddfe39ce0ceb579421be38c2.zip
Replace assertTrue with assertThat
java.lang.AssertionError: Expected: an instance of org.eclipse.equinox.internal.p2.updatesite.metadata.UpdateSiteMetadataRepository but: <org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository@180f33b2> is a org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20) at org.junit.Assert.assertThat(Assert.java:956) at org.junit.Assert.assertThat(Assert.java:923) at org.eclipse.equinox.p2.tests.metadata.repository.SiteIndexFileTest.testSingleRepository1(SiteIndexFileTest.java:258) Change-Id: Ifbfd6d8ced0c6a50a53a39faeb5311ba32097482 Signed-off-by: Mykola Nikishov <mn@mn.com.ua>
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/SiteIndexFileTest.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/SiteIndexFileTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/SiteIndexFileTest.java
index 3272a411a..2daaafe39 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/SiteIndexFileTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/SiteIndexFileTest.java
@@ -11,6 +11,7 @@
package org.eclipse.equinox.p2.tests.metadata.repository;
import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertThat;
import java.io.*;
import java.net.URI;
@@ -27,6 +28,7 @@ import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
import org.eclipse.equinox.p2.tests.*;
+import org.hamcrest.core.IsInstanceOf;
/**
* These tests are used to verify the index.p2 file in a variety
@@ -249,7 +251,7 @@ public class SiteIndexFileTest extends AbstractProvisioningTest {
try {
System.setOut(new PrintStream(new StringBufferStream()));
IMetadataRepository repository = getMetadataRepositoryManager().loadRepository(repositoryLocation, new NullProgressMonitor());
- assertTrue(repository instanceof UpdateSiteMetadataRepository);
+ assertThat(repository, new IsInstanceOf(UpdateSiteMetadataRepository.class));
} finally {
System.setOut(out);
}

Back to the top