diff options
author | Alexander Kurtakov | 2021-12-04 15:00:23 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2021-12-04 19:24:03 +0000 |
commit | c825fa54abe11fef6d0b8e866a327fd640863b3d (patch) | |
tree | 3de4f8451a027f0a2f226549ecbd529da0f7cc7e | |
parent | 2433af672d1e82d98dce07babf61d2660aed22d2 (diff) | |
download | rt.equinox.p2-c825fa54abe11fef6d0b8e866a327fd640863b3d.tar.gz rt.equinox.p2-c825fa54abe11fef6d0b8e866a327fd640863b3d.tar.xz rt.equinox.p2-c825fa54abe11fef6d0b8e866a327fd640863b3d.zip |
Improve asserts in MetadataRepositoryManagerTestI20211204-1800
Change-Id: Ia6c005550909c1119f9e93bc4a3f915e4a4a56ab
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/188532
-rw-r--r-- | bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java index 3af32252c..22f8f9150 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2018 IBM Corporation and others. + * Copyright (c) 2007, 2021 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -14,6 +14,8 @@ *******************************************************************************/ package org.eclipse.equinox.p2.tests.metadata.repository; +import static org.junit.Assert.assertNotEquals; + import java.io.File; import java.io.IOException; import java.io.PrintStream; @@ -403,7 +405,7 @@ public class MetadataRepositoryManagerTest extends AbstractProvisioningTest { manager.removeRepository(repoLocation); manager.loadRepository(repoLocation, null); long lastModified = cacheFile.lastModified(); - assertTrue(0 != lastModified); + assertNotEquals(0, lastModified); // reload the repository and check that the cache was not updated manager.loadRepository(repoLocation, null); @@ -560,7 +562,7 @@ public class MetadataRepositoryManagerTest extends AbstractProvisioningTest { try { IMetadataRepository repoSlash = manager.loadRepository(locationSlash, null); IMetadataRepository repoNoSlash = manager.loadRepository(locationNoSlash, null); - assertTrue("1.0", repoNoSlash == repoSlash); + assertSame("1.0", repoNoSlash, repoSlash); } catch (ProvisionException e) { fail("1.99", e); } |