From d27f5e03f08fd72743d170ff1812e1d14f5415ff Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Sat, 9 May 2020 15:40:14 -0700 Subject: [PATCH] Replace usages of deprecated org.junit.Assert.assertThat with usages of non-deprecated org.hamcrest.MatcherAssert.assertThat --- core/src/test/java/hudson/PluginManagerTest.java | 2 +- core/src/test/java/hudson/PluginWrapperTest.java | 2 +- core/src/test/java/hudson/UtilTest.java | 2 +- core/src/test/java/hudson/XmlFileTest.java | 2 +- core/src/test/java/hudson/model/ActionableTest.java | 2 +- .../test/java/hudson/model/FingerprintCleanupThreadTest.java | 2 +- core/src/test/java/hudson/model/FingerprintTest.java | 2 +- core/src/test/java/hudson/model/JobTest.java | 2 +- core/src/test/java/hudson/model/LoadStatisticsTest.java | 2 +- core/src/test/java/hudson/model/UpdateCenterTest.java | 2 +- core/src/test/java/hudson/model/UserTest.java | 2 +- core/src/test/java/hudson/util/SecretTest.java | 2 +- core/src/test/java/hudson/util/XStream2EncodingTest.java | 2 +- core/src/test/java/hudson/util/XStream2Test.java | 2 +- core/src/test/java/jenkins/model/IdStrategyTest.java | 2 +- .../src/test/java/jenkins/slaves/RemotingVersionInfoTest.java | 2 +- core/src/test/java/jenkins/util/VirtualFileTest.java | 2 +- core/src/test/java/jenkins/util/io/FileLockerRule.java | 2 +- core/src/test/java/jenkins/util/xstream/XStreamDOMTest.java | 2 +- core/src/test/java/jenkins/xml/XMLUtilsTest.java | 2 +- test/src/test/java/hudson/AboutJenkinsTest.java | 2 +- test/src/test/java/hudson/ExtensionFinderTest.java | 2 +- test/src/test/java/hudson/FilePathTest.java | 2 +- test/src/test/java/hudson/LauncherTest.java | 2 +- .../test/java/hudson/PluginManagerCheckUpdateCenterTest.java | 2 +- test/src/test/java/hudson/TcpSlaveAgentListenerTest.java | 2 +- test/src/test/java/hudson/XMLFileTest.java | 2 +- test/src/test/java/hudson/cli/BuildCommandTest.java | 2 +- test/src/test/java/hudson/cli/CLIEnvVarTest.java | 2 +- test/src/test/java/hudson/cli/CLITest.java | 2 +- test/src/test/java/hudson/cli/DisablePluginCommandTest.java | 2 +- test/src/test/java/hudson/cli/EnableJobCommandTest.java | 2 +- test/src/test/java/hudson/cli/EnablePluginCommandTest.java | 2 +- test/src/test/java/hudson/cli/GroovyshCommandTest.java | 2 +- test/src/test/java/hudson/cli/HelpCommandTest.java | 2 +- test/src/test/java/hudson/cli/InstallPluginCommandTest.java | 2 +- test/src/test/java/hudson/cli/ListPluginsCommandTest.java | 2 +- test/src/test/java/hudson/console/AnnotatedLargeTextTest.java | 2 +- test/src/test/java/hudson/console/ConsoleAnnotatorTest.java | 2 +- test/src/test/java/hudson/console/HyperlinkNoteTest.java | 2 +- test/src/test/java/hudson/jobs/CreateItemTest.java | 2 +- test/src/test/java/hudson/model/AbstractBuildTest.java | 2 +- test/src/test/java/hudson/model/AbstractItem2Test.java | 2 +- test/src/test/java/hudson/model/AbstractItemSecurityTest.java | 2 +- test/src/test/java/hudson/model/AbstractItemTest.java | 2 +- .../test/java/hudson/model/AbstractProjectSEC1781Test.java | 2 +- test/src/test/java/hudson/model/AbstractProjectTest.java | 2 +- test/src/test/java/hudson/model/AperiodicWorkTest.java | 2 +- test/src/test/java/hudson/model/ApiSEC1704Test.java | 2 +- test/src/test/java/hudson/model/ApiTest.java | 2 +- .../test/java/hudson/model/BuildAuthorizationTokenTest.java | 2 +- test/src/test/java/hudson/model/CauseTest.java | 2 +- test/src/test/java/hudson/model/ComputerSetTest.java | 2 +- test/src/test/java/hudson/model/DescriptorTest.java | 2 +- .../java/hudson/model/DescriptorVisibilityFilterTest.java | 2 +- .../test/java/hudson/model/DirectlyModifiableViewTest.java | 2 +- .../test/java/hudson/model/DirectoryBrowserSupportTest.java | 2 +- test/src/test/java/hudson/model/ExecutorTest.java | 2 +- test/src/test/java/hudson/model/FileParameterValueTest.java | 2 +- test/src/test/java/hudson/model/FingerprintTest.java | 2 +- test/src/test/java/hudson/model/FreeStyleProjectTest.java | 2 +- test/src/test/java/hudson/model/ItemGroupMixInTest.java | 2 +- test/src/test/java/hudson/model/ItemsTest.java | 2 +- test/src/test/java/hudson/model/JobTest.java | 2 +- .../java/hudson/model/LabelLoadStatisticsQueueLengthTest.java | 2 +- test/src/test/java/hudson/model/MyViewTest.java | 4 ++-- test/src/test/java/hudson/model/NodeTest.java | 2 +- test/src/test/java/hudson/model/ParametersAction2Test.java | 2 +- test/src/test/java/hudson/model/PeriodicWorkTest.java | 2 +- test/src/test/java/hudson/model/QueueSEC1537Test.java | 2 +- test/src/test/java/hudson/model/QueueTest.java | 2 +- test/src/test/java/hudson/model/RSSTest.java | 2 +- test/src/test/java/hudson/model/RunActionTest.java | 2 +- test/src/test/java/hudson/model/SlaveTest.java | 2 +- test/src/test/java/hudson/model/UpdateCenterCustomTest.java | 2 +- test/src/test/java/hudson/model/UsageStatisticsTest.java | 2 +- test/src/test/java/hudson/model/UserIdMigratorTest.java | 2 +- test/src/test/java/hudson/model/UserPropertyTest.java | 2 +- test/src/test/java/hudson/model/UserRestartTest.java | 2 +- test/src/test/java/hudson/model/UserTest.java | 2 +- test/src/test/java/hudson/model/ViewTest.java | 2 +- .../test/java/hudson/model/listeners/ItemListenerTest.java | 2 +- .../model/queue/BuildKeepsRunningWhenFaultySubTasksTest.java | 2 +- .../test/java/hudson/model/queue/QueueTaskDispatcherTest.java | 2 +- test/src/test/java/hudson/scm/AbstractScmTagActionTest.java | 2 +- .../java/hudson/security/HudsonPrivateSecurityRealmTest.java | 2 +- test/src/test/java/hudson/security/SecurityRealmTest.java | 2 +- .../hudson/security/TokenBasedRememberMeServices2Test.java | 2 +- .../test/java/hudson/security/csrf/CrumbExclusionTest.java | 2 +- .../hudson/security/csrf/DefaultCrumbIssuerSEC1491Test.java | 2 +- .../hudson/security/csrf/DefaultCrumbIssuerSEC1704Test.java | 2 +- .../hudson/security/csrf/DefaultCrumbIssuerSEC626Test.java | 2 +- test/src/test/java/hudson/slaves/CloudTest.java | 2 +- test/src/test/java/hudson/slaves/JNLPLauncherTest.java | 2 +- test/src/test/java/hudson/tasks/ArtifactArchiverTest.java | 2 +- test/src/test/java/hudson/tasks/FingerprinterTest.java | 2 +- test/src/test/java/hudson/tasks/LogRotatorTest.java | 2 +- .../test/java/hudson/tools/ZipExtractionInstallerTest.java | 2 +- .../test/java/hudson/util/AlternativeUiTextProviderTest.java | 2 +- test/src/test/java/hudson/util/HudsonIsLoadingTest.java | 2 +- test/src/test/java/hudson/util/HudsonIsRestartingTest.java | 2 +- test/src/test/java/hudson/util/SecretCompatTest.java | 2 +- .../java/hudson/views/GlobalDefaultViewConfigurationTest.java | 2 +- test/src/test/java/jenkins/ExtensionFilterTest.java | 2 +- test/src/test/java/jenkins/install/InstallStateTest.java | 2 +- .../test/java/jenkins/install/LoadDetachedPluginsTest.java | 2 +- test/src/test/java/jenkins/install/SetupWizardTest.java | 2 +- .../jenkins/model/GlobalSCMRetryCountConfigurationTest.java | 2 +- .../model/JenkinsBuildsAndWorkspacesDirectoriesTest.java | 2 +- .../model/JenkinsSystemReadAndManagePermissionTest.java | 2 +- .../java/jenkins/model/JenkinsSystemReadPermissionTest.java | 2 +- test/src/test/java/jenkins/model/NodesTest.java | 2 +- test/src/test/java/jenkins/model/PeepholePermalinkTest.java | 2 +- .../test/java/jenkins/model/TransientActionFactoryTest.java | 2 +- .../java/jenkins/model/identity/IdentityRootActionTest.java | 2 +- test/src/test/java/jenkins/security/ApiTokenPropertyTest.java | 2 +- .../security/BasicHeaderApiTokenAuthenticatorTest.java | 2 +- test/src/test/java/jenkins/security/ClassFilterImplTest.java | 2 +- .../RedactSecretJsonInErrorMessageSanitizerHtmlTest.java | 2 +- test/src/test/java/jenkins/security/Security218Test.java | 2 +- test/src/test/java/jenkins/security/Security637Test.java | 2 +- .../jenkins/security/apitoken/ApiTokenStatsRestartTest.java | 2 +- .../java/jenkins/security/apitoken/ApiTokenStatsTest.java | 2 +- .../apitoken/LegacyApiTokenAdministrativeMonitorTest.java | 2 +- .../java/jenkins/security/s2m/DefaultFilePathFilterTest.java | 2 +- .../jenkins/security/seed/UserSeedChangeListenerTest.java | 2 +- .../test/java/jenkins/security/seed/UserSeedPropertyTest.java | 2 +- .../security/stapler/CustomRoutingDecisionProviderTest.java | 2 +- test/src/test/java/jenkins/security/stapler/DynamicTest.java | 2 +- .../test/java/jenkins/security/stapler/Security400Test.java | 2 +- .../test/java/jenkins/security/stapler/Security867Test.java | 2 +- .../java/jenkins/security/stapler/StaplerAbstractTest.java | 2 +- .../security/stapler/StaticRoutingDecisionProvider2Test.java | 2 +- test/src/test/java/jenkins/slaves/OldRemotingAgentTest.java | 2 +- .../src/test/java/jenkins/slaves/RemotingVersionInfoTest.java | 2 +- test/src/test/java/jenkins/telemetry/TelemetryTest.java | 2 +- .../impl/java11/MissingClassTelemetryFasterTest.java | 2 +- .../test/java/jenkins/triggers/ReverseBuildTriggerTest.java | 2 +- test/src/test/java/jenkins/util/JenkinsJVMRealTest.java | 2 +- test/src/test/java/jenkins/util/SystemPropertiesTest.java | 2 +- test/src/test/java/lib/form/PasswordTest.java | 2 +- test/src/test/java/lib/form/ValidateButtonSEC1327Test.java | 2 +- 142 files changed, 143 insertions(+), 143 deletions(-) diff --git a/core/src/test/java/hudson/PluginManagerTest.java b/core/src/test/java/hudson/PluginManagerTest.java index 6a46419e24..411dd3af7e 100644 --- a/core/src/test/java/hudson/PluginManagerTest.java +++ b/core/src/test/java/hudson/PluginManagerTest.java @@ -42,7 +42,7 @@ import static org.hamcrest.CoreMatchers.*; import static org.hamcrest.core.IsInstanceOf.instanceOf; import static org.hamcrest.core.StringContains.containsString; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.fail; import org.junit.Rule; import org.junit.rules.TemporaryFolder; diff --git a/core/src/test/java/hudson/PluginWrapperTest.java b/core/src/test/java/hudson/PluginWrapperTest.java index b80fff8d1a..dba6df30d4 100644 --- a/core/src/test/java/hudson/PluginWrapperTest.java +++ b/core/src/test/java/hudson/PluginWrapperTest.java @@ -19,7 +19,7 @@ import org.mockito.stubbing.Answer; import static org.hamcrest.CoreMatchers.containsString; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import org.jvnet.hudson.test.Issue; diff --git a/core/src/test/java/hudson/UtilTest.java b/core/src/test/java/hudson/UtilTest.java index 4de596653e..1426ecb657 100644 --- a/core/src/test/java/hudson/UtilTest.java +++ b/core/src/test/java/hudson/UtilTest.java @@ -53,7 +53,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; diff --git a/core/src/test/java/hudson/XmlFileTest.java b/core/src/test/java/hudson/XmlFileTest.java index 85072f4a0d..fea23a9db0 100644 --- a/core/src/test/java/hudson/XmlFileTest.java +++ b/core/src/test/java/hudson/XmlFileTest.java @@ -12,7 +12,7 @@ import org.junit.Test; import org.xml.sax.SAXParseException; import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class XmlFileTest { diff --git a/core/src/test/java/hudson/model/ActionableTest.java b/core/src/test/java/hudson/model/ActionableTest.java index 911099b9d9..7628460c11 100644 --- a/core/src/test/java/hudson/model/ActionableTest.java +++ b/core/src/test/java/hudson/model/ActionableTest.java @@ -30,7 +30,7 @@ import java.util.Arrays; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import java.util.Collections; diff --git a/core/src/test/java/hudson/model/FingerprintCleanupThreadTest.java b/core/src/test/java/hudson/model/FingerprintCleanupThreadTest.java index 54c36ec678..fa0e71ff56 100644 --- a/core/src/test/java/hudson/model/FingerprintCleanupThreadTest.java +++ b/core/src/test/java/hudson/model/FingerprintCleanupThreadTest.java @@ -44,7 +44,7 @@ import static org.hamcrest.core.StringContains.containsString; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class FingerprintCleanupThreadTest { diff --git a/core/src/test/java/hudson/model/FingerprintTest.java b/core/src/test/java/hudson/model/FingerprintTest.java index 535cb36436..5f2c1ed1bf 100644 --- a/core/src/test/java/hudson/model/FingerprintTest.java +++ b/core/src/test/java/hudson/model/FingerprintTest.java @@ -33,7 +33,7 @@ import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import org.junit.Rule; diff --git a/core/src/test/java/hudson/model/JobTest.java b/core/src/test/java/hudson/model/JobTest.java index 2c6fabe0e0..7f9ba96d7e 100644 --- a/core/src/test/java/hudson/model/JobTest.java +++ b/core/src/test/java/hudson/model/JobTest.java @@ -1,7 +1,7 @@ package hudson.model; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import org.hamcrest.CoreMatchers; diff --git a/core/src/test/java/hudson/model/LoadStatisticsTest.java b/core/src/test/java/hudson/model/LoadStatisticsTest.java index d49fad2609..f619313e5d 100644 --- a/core/src/test/java/hudson/model/LoadStatisticsTest.java +++ b/core/src/test/java/hudson/model/LoadStatisticsTest.java @@ -38,7 +38,7 @@ import java.io.File; import java.io.IOException; import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; /** * @author Kohsuke Kawaguchi diff --git a/core/src/test/java/hudson/model/UpdateCenterTest.java b/core/src/test/java/hudson/model/UpdateCenterTest.java index cdb412f27f..d5bebba503 100644 --- a/core/src/test/java/hudson/model/UpdateCenterTest.java +++ b/core/src/test/java/hudson/model/UpdateCenterTest.java @@ -9,7 +9,7 @@ import java.util.Locale; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; diff --git a/core/src/test/java/hudson/model/UserTest.java b/core/src/test/java/hudson/model/UserTest.java index efded82496..dd90e510f6 100644 --- a/core/src/test/java/hudson/model/UserTest.java +++ b/core/src/test/java/hudson/model/UserTest.java @@ -1,7 +1,7 @@ package hudson.model; import static org.hamcrest.CoreMatchers.*; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import org.junit.Test; import org.jvnet.hudson.test.Issue; diff --git a/core/src/test/java/hudson/util/SecretTest.java b/core/src/test/java/hudson/util/SecretTest.java index 2db8b0f702..efe2c043ae 100644 --- a/core/src/test/java/hudson/util/SecretTest.java +++ b/core/src/test/java/hudson/util/SecretTest.java @@ -36,7 +36,7 @@ import org.apache.commons.lang.RandomStringUtils; import static org.hamcrest.CoreMatchers.*; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import org.junit.Rule; import org.junit.Test; diff --git a/core/src/test/java/hudson/util/XStream2EncodingTest.java b/core/src/test/java/hudson/util/XStream2EncodingTest.java index 81b0ed80ee..56d7b0b764 100644 --- a/core/src/test/java/hudson/util/XStream2EncodingTest.java +++ b/core/src/test/java/hudson/util/XStream2EncodingTest.java @@ -32,7 +32,7 @@ import java.nio.charset.StandardCharsets; import static org.hamcrest.CoreMatchers.*; import org.junit.After; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assume.*; import org.junit.Before; import org.junit.Test; diff --git a/core/src/test/java/hudson/util/XStream2Test.java b/core/src/test/java/hudson/util/XStream2Test.java index 38d463635f..ec9e0bbbbb 100644 --- a/core/src/test/java/hudson/util/XStream2Test.java +++ b/core/src/test/java/hudson/util/XStream2Test.java @@ -27,7 +27,7 @@ import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; diff --git a/core/src/test/java/jenkins/model/IdStrategyTest.java b/core/src/test/java/jenkins/model/IdStrategyTest.java index ea84528106..fa26420f1f 100644 --- a/core/src/test/java/jenkins/model/IdStrategyTest.java +++ b/core/src/test/java/jenkins/model/IdStrategyTest.java @@ -4,7 +4,7 @@ import org.junit.Test; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; public class IdStrategyTest { diff --git a/core/src/test/java/jenkins/slaves/RemotingVersionInfoTest.java b/core/src/test/java/jenkins/slaves/RemotingVersionInfoTest.java index 5f629028ed..5a11ad67d3 100644 --- a/core/src/test/java/jenkins/slaves/RemotingVersionInfoTest.java +++ b/core/src/test/java/jenkins/slaves/RemotingVersionInfoTest.java @@ -26,7 +26,7 @@ package jenkins.slaves; import org.junit.Test; import static org.hamcrest.CoreMatchers.*; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; /** * Tests for {@link RemotingVersionInfo}. diff --git a/core/src/test/java/jenkins/util/VirtualFileTest.java b/core/src/test/java/jenkins/util/VirtualFileTest.java index 51638608b6..8544c3f398 100644 --- a/core/src/test/java/jenkins/util/VirtualFileTest.java +++ b/core/src/test/java/jenkins/util/VirtualFileTest.java @@ -54,7 +54,7 @@ import static org.hamcrest.Matchers.*; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.junit.Assume.assumeFalse; diff --git a/core/src/test/java/jenkins/util/io/FileLockerRule.java b/core/src/test/java/jenkins/util/io/FileLockerRule.java index 2607131392..ce66a10a16 100644 --- a/core/src/test/java/jenkins/util/io/FileLockerRule.java +++ b/core/src/test/java/jenkins/util/io/FileLockerRule.java @@ -40,7 +40,7 @@ import java.util.Map; import static org.hamcrest.Matchers.hasKey; import static org.hamcrest.Matchers.not; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; /** diff --git a/core/src/test/java/jenkins/util/xstream/XStreamDOMTest.java b/core/src/test/java/jenkins/util/xstream/XStreamDOMTest.java index 8b2fb588fa..1774b803e0 100644 --- a/core/src/test/java/jenkins/util/xstream/XStreamDOMTest.java +++ b/core/src/test/java/jenkins/util/xstream/XStreamDOMTest.java @@ -32,7 +32,7 @@ import org.xmlunit.diff.ElementSelectors; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.xmlunit.matchers.CompareMatcher.isSimilarTo; diff --git a/core/src/test/java/jenkins/xml/XMLUtilsTest.java b/core/src/test/java/jenkins/xml/XMLUtilsTest.java index 55b0d806bb..a9ed1b892b 100644 --- a/core/src/test/java/jenkins/xml/XMLUtilsTest.java +++ b/core/src/test/java/jenkins/xml/XMLUtilsTest.java @@ -40,7 +40,7 @@ import javax.xml.transform.stream.StreamSource; import javax.xml.xpath.XPathExpressionException; import static org.hamcrest.core.StringContains.containsString; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import org.jvnet.hudson.test.Issue; import org.xml.sax.SAXException; diff --git a/test/src/test/java/hudson/AboutJenkinsTest.java b/test/src/test/java/hudson/AboutJenkinsTest.java index 2ab13b29c3..3c80a040ba 100644 --- a/test/src/test/java/hudson/AboutJenkinsTest.java +++ b/test/src/test/java/hudson/AboutJenkinsTest.java @@ -37,7 +37,7 @@ import java.net.HttpURLConnection; import static org.hamcrest.Matchers.containsString; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; @Category(SmokeTest.class) public class AboutJenkinsTest { diff --git a/test/src/test/java/hudson/ExtensionFinderTest.java b/test/src/test/java/hudson/ExtensionFinderTest.java index 2eb2ac3cb8..8e7192cf4e 100644 --- a/test/src/test/java/hudson/ExtensionFinderTest.java +++ b/test/src/test/java/hudson/ExtensionFinderTest.java @@ -34,7 +34,7 @@ import static org.hamcrest.Matchers.*; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import org.junit.Rule; import org.junit.Test; diff --git a/test/src/test/java/hudson/FilePathTest.java b/test/src/test/java/hudson/FilePathTest.java index 1463b14404..1a14088a1f 100644 --- a/test/src/test/java/hudson/FilePathTest.java +++ b/test/src/test/java/hudson/FilePathTest.java @@ -28,7 +28,7 @@ import hudson.model.Node; import org.apache.tools.ant.DirectoryScanner; import static org.hamcrest.Matchers.*; import org.junit.Test; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.fail; import static org.junit.Assume.*; import org.junit.Rule; diff --git a/test/src/test/java/hudson/LauncherTest.java b/test/src/test/java/hudson/LauncherTest.java index f79f35d1c1..b02841401f 100644 --- a/test/src/test/java/hudson/LauncherTest.java +++ b/test/src/test/java/hudson/LauncherTest.java @@ -55,7 +55,7 @@ import java.util.Map; import org.apache.commons.io.FileUtils; import static org.hamcrest.Matchers.*; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assume.*; import org.junit.Rule; diff --git a/test/src/test/java/hudson/PluginManagerCheckUpdateCenterTest.java b/test/src/test/java/hudson/PluginManagerCheckUpdateCenterTest.java index 4acd2838cc..b3bac7a482 100644 --- a/test/src/test/java/hudson/PluginManagerCheckUpdateCenterTest.java +++ b/test/src/test/java/hudson/PluginManagerCheckUpdateCenterTest.java @@ -32,7 +32,7 @@ import java.util.stream.Collectors; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class PluginManagerCheckUpdateCenterTest { @Rule diff --git a/test/src/test/java/hudson/TcpSlaveAgentListenerTest.java b/test/src/test/java/hudson/TcpSlaveAgentListenerTest.java index 484e938a67..bdeb30e028 100644 --- a/test/src/test/java/hudson/TcpSlaveAgentListenerTest.java +++ b/test/src/test/java/hudson/TcpSlaveAgentListenerTest.java @@ -14,7 +14,7 @@ import org.jvnet.hudson.test.JenkinsRule.WebClient; import static org.hamcrest.Matchers.*; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class TcpSlaveAgentListenerTest { diff --git a/test/src/test/java/hudson/XMLFileTest.java b/test/src/test/java/hudson/XMLFileTest.java index 1b3a9ff3ea..7c18519fbb 100644 --- a/test/src/test/java/hudson/XMLFileTest.java +++ b/test/src/test/java/hudson/XMLFileTest.java @@ -9,7 +9,7 @@ import org.jvnet.hudson.test.JenkinsRule; import org.jvnet.hudson.test.recipes.LocalData; import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class XMLFileTest { diff --git a/test/src/test/java/hudson/cli/BuildCommandTest.java b/test/src/test/java/hudson/cli/BuildCommandTest.java index 27b918a7f2..7a6d1f21c4 100644 --- a/test/src/test/java/hudson/cli/BuildCommandTest.java +++ b/test/src/test/java/hudson/cli/BuildCommandTest.java @@ -59,7 +59,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import org.junit.ClassRule; import org.junit.Rule; diff --git a/test/src/test/java/hudson/cli/CLIEnvVarTest.java b/test/src/test/java/hudson/cli/CLIEnvVarTest.java index 0a5b18a928..21900bde0b 100644 --- a/test/src/test/java/hudson/cli/CLIEnvVarTest.java +++ b/test/src/test/java/hudson/cli/CLIEnvVarTest.java @@ -27,7 +27,7 @@ import java.util.Map; import static org.hamcrest.Matchers.containsString; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class CLIEnvVarTest { diff --git a/test/src/test/java/hudson/cli/CLITest.java b/test/src/test/java/hudson/cli/CLITest.java index c591ae8de6..27dd29333d 100644 --- a/test/src/test/java/hudson/cli/CLITest.java +++ b/test/src/test/java/hudson/cli/CLITest.java @@ -55,7 +55,7 @@ import org.jenkinsci.main.modules.sshd.SSHD; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assume.*; import org.junit.ClassRule; import org.junit.Rule; diff --git a/test/src/test/java/hudson/cli/DisablePluginCommandTest.java b/test/src/test/java/hudson/cli/DisablePluginCommandTest.java index 5913fa88a2..2201692c4d 100644 --- a/test/src/test/java/hudson/cli/DisablePluginCommandTest.java +++ b/test/src/test/java/hudson/cli/DisablePluginCommandTest.java @@ -46,7 +46,7 @@ import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import org.junit.Ignore; diff --git a/test/src/test/java/hudson/cli/EnableJobCommandTest.java b/test/src/test/java/hudson/cli/EnableJobCommandTest.java index 7c2e50f14b..e63a4fb419 100644 --- a/test/src/test/java/hudson/cli/EnableJobCommandTest.java +++ b/test/src/test/java/hudson/cli/EnableJobCommandTest.java @@ -26,7 +26,7 @@ package hudson.cli; import hudson.model.FreeStyleProject; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import org.junit.Rule; import org.junit.Test; diff --git a/test/src/test/java/hudson/cli/EnablePluginCommandTest.java b/test/src/test/java/hudson/cli/EnablePluginCommandTest.java index 85e65cccfb..9778cff5c1 100644 --- a/test/src/test/java/hudson/cli/EnablePluginCommandTest.java +++ b/test/src/test/java/hudson/cli/EnablePluginCommandTest.java @@ -38,7 +38,7 @@ import static hudson.cli.CLICommandInvoker.Matcher.failedWith; import static hudson.cli.CLICommandInvoker.Matcher.succeeded; import static org.hamcrest.Matchers.*; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import org.junit.Ignore; diff --git a/test/src/test/java/hudson/cli/GroovyshCommandTest.java b/test/src/test/java/hudson/cli/GroovyshCommandTest.java index 421f6c630b..7f9d9e9213 100644 --- a/test/src/test/java/hudson/cli/GroovyshCommandTest.java +++ b/test/src/test/java/hudson/cli/GroovyshCommandTest.java @@ -28,7 +28,7 @@ import static hudson.cli.CLICommandInvoker.Matcher.*; import jenkins.model.Jenkins; import org.apache.tools.ant.filters.StringInputStream; import static org.hamcrest.CoreMatchers.containsString; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import org.junit.Rule; import org.junit.Test; import org.jvnet.hudson.test.Issue; diff --git a/test/src/test/java/hudson/cli/HelpCommandTest.java b/test/src/test/java/hudson/cli/HelpCommandTest.java index a0090afd61..020c2a08e8 100644 --- a/test/src/test/java/hudson/cli/HelpCommandTest.java +++ b/test/src/test/java/hudson/cli/HelpCommandTest.java @@ -25,7 +25,7 @@ package hudson.cli; import static hudson.cli.CLICommandInvoker.Matcher.*; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.CoreMatchers.*; import static org.hamcrest.text.StringContainsInOrder.stringContainsInOrder; diff --git a/test/src/test/java/hudson/cli/InstallPluginCommandTest.java b/test/src/test/java/hudson/cli/InstallPluginCommandTest.java index c76b386e5c..a247506518 100644 --- a/test/src/test/java/hudson/cli/InstallPluginCommandTest.java +++ b/test/src/test/java/hudson/cli/InstallPluginCommandTest.java @@ -27,7 +27,7 @@ package hudson.cli; import org.junit.Test; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import org.junit.Rule; import org.jvnet.hudson.test.Issue; import org.jvnet.hudson.test.JenkinsRule; diff --git a/test/src/test/java/hudson/cli/ListPluginsCommandTest.java b/test/src/test/java/hudson/cli/ListPluginsCommandTest.java index 530fa8875f..f60b490804 100644 --- a/test/src/test/java/hudson/cli/ListPluginsCommandTest.java +++ b/test/src/test/java/hudson/cli/ListPluginsCommandTest.java @@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.not; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class ListPluginsCommandTest { diff --git a/test/src/test/java/hudson/console/AnnotatedLargeTextTest.java b/test/src/test/java/hudson/console/AnnotatedLargeTextTest.java index c911e66de4..45c8f1f4e0 100644 --- a/test/src/test/java/hudson/console/AnnotatedLargeTextTest.java +++ b/test/src/test/java/hudson/console/AnnotatedLargeTextTest.java @@ -33,7 +33,7 @@ import java.util.logging.Level; import org.apache.commons.io.Charsets; import static org.hamcrest.CoreMatchers.*; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; diff --git a/test/src/test/java/hudson/console/ConsoleAnnotatorTest.java b/test/src/test/java/hudson/console/ConsoleAnnotatorTest.java index d7e47e0cd8..1925cccf6e 100644 --- a/test/src/test/java/hudson/console/ConsoleAnnotatorTest.java +++ b/test/src/test/java/hudson/console/ConsoleAnnotatorTest.java @@ -32,7 +32,7 @@ import jenkins.model.Jenkins; import static org.hamcrest.Matchers.containsString; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import org.junit.Rule; import org.junit.Test; diff --git a/test/src/test/java/hudson/console/HyperlinkNoteTest.java b/test/src/test/java/hudson/console/HyperlinkNoteTest.java index c65019f292..ca9b6f32cc 100644 --- a/test/src/test/java/hudson/console/HyperlinkNoteTest.java +++ b/test/src/test/java/hudson/console/HyperlinkNoteTest.java @@ -37,7 +37,7 @@ import org.jvnet.hudson.test.JenkinsRule; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.containsString; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class HyperlinkNoteTest { diff --git a/test/src/test/java/hudson/jobs/CreateItemTest.java b/test/src/test/java/hudson/jobs/CreateItemTest.java index 9cf101e96b..7576d6d92d 100644 --- a/test/src/test/java/hudson/jobs/CreateItemTest.java +++ b/test/src/test/java/hudson/jobs/CreateItemTest.java @@ -26,7 +26,7 @@ package hudson.jobs; import static org.hamcrest.Matchers.nullValue; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import com.gargoylesoftware.htmlunit.Page; import hudson.model.Failure; diff --git a/test/src/test/java/hudson/model/AbstractBuildTest.java b/test/src/test/java/hudson/model/AbstractBuildTest.java index 7e80a21488..c52e143115 100644 --- a/test/src/test/java/hudson/model/AbstractBuildTest.java +++ b/test/src/test/java/hudson/model/AbstractBuildTest.java @@ -46,7 +46,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import hudson.tasks.LogRotatorTest; diff --git a/test/src/test/java/hudson/model/AbstractItem2Test.java b/test/src/test/java/hudson/model/AbstractItem2Test.java index b6f59a5ece..eb440bbffe 100644 --- a/test/src/test/java/hudson/model/AbstractItem2Test.java +++ b/test/src/test/java/hudson/model/AbstractItem2Test.java @@ -29,7 +29,7 @@ import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.not; import org.junit.Test; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import org.junit.Rule; import org.junit.runners.model.Statement; import org.jvnet.hudson.test.Issue; diff --git a/test/src/test/java/hudson/model/AbstractItemSecurityTest.java b/test/src/test/java/hudson/model/AbstractItemSecurityTest.java index 653097d295..5590e0a170 100644 --- a/test/src/test/java/hudson/model/AbstractItemSecurityTest.java +++ b/test/src/test/java/hudson/model/AbstractItemSecurityTest.java @@ -36,7 +36,7 @@ import static org.hamcrest.core.IsNot.not; import static org.hamcrest.core.IsNull.nullValue; import static org.hamcrest.core.StringContains.containsString; import static org.hamcrest.text.IsEmptyString.isEmptyOrNullString; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import org.jvnet.hudson.test.Issue; public class AbstractItemSecurityTest { diff --git a/test/src/test/java/hudson/model/AbstractItemTest.java b/test/src/test/java/hudson/model/AbstractItemTest.java index 32551f240a..7b02cebefe 100644 --- a/test/src/test/java/hudson/model/AbstractItemTest.java +++ b/test/src/test/java/hudson/model/AbstractItemTest.java @@ -25,7 +25,7 @@ import org.jvnet.hudson.test.SleepBuilder; import static org.hamcrest.Matchers.equalTo; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.fail; public class AbstractItemTest { diff --git a/test/src/test/java/hudson/model/AbstractProjectSEC1781Test.java b/test/src/test/java/hudson/model/AbstractProjectSEC1781Test.java index 76bf921d10..db633b9cea 100644 --- a/test/src/test/java/hudson/model/AbstractProjectSEC1781Test.java +++ b/test/src/test/java/hudson/model/AbstractProjectSEC1781Test.java @@ -14,7 +14,7 @@ import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.hasSize; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; //TODO merge back to AbstractProjectTest when security release is done. // Creating a different test class is used to ease the security merge process. diff --git a/test/src/test/java/hudson/model/AbstractProjectTest.java b/test/src/test/java/hudson/model/AbstractProjectTest.java index 2dfa4d7f1f..76601a5788 100644 --- a/test/src/test/java/hudson/model/AbstractProjectTest.java +++ b/test/src/test/java/hudson/model/AbstractProjectTest.java @@ -62,7 +62,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import org.junit.Rule; diff --git a/test/src/test/java/hudson/model/AperiodicWorkTest.java b/test/src/test/java/hudson/model/AperiodicWorkTest.java index 5b81e05c8f..57242d43ef 100644 --- a/test/src/test/java/hudson/model/AperiodicWorkTest.java +++ b/test/src/test/java/hudson/model/AperiodicWorkTest.java @@ -11,7 +11,7 @@ import hudson.ExtensionList; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class AperiodicWorkTest { diff --git a/test/src/test/java/hudson/model/ApiSEC1704Test.java b/test/src/test/java/hudson/model/ApiSEC1704Test.java index 69d6323499..dee82679b4 100644 --- a/test/src/test/java/hudson/model/ApiSEC1704Test.java +++ b/test/src/test/java/hudson/model/ApiSEC1704Test.java @@ -34,7 +34,7 @@ import org.kohsuke.stapler.export.ExportedBean; import edu.umd.cs.findbugs.annotations.CheckForNull; import static org.hamcrest.Matchers.equalTo; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; //TODO to be merged back to ApiTest after security release /** diff --git a/test/src/test/java/hudson/model/ApiTest.java b/test/src/test/java/hudson/model/ApiTest.java index 7743b9fb0e..d07a9a9c42 100644 --- a/test/src/test/java/hudson/model/ApiTest.java +++ b/test/src/test/java/hudson/model/ApiTest.java @@ -37,7 +37,7 @@ import java.net.HttpURLConnection; import static org.hamcrest.Matchers.containsString; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; /** diff --git a/test/src/test/java/hudson/model/BuildAuthorizationTokenTest.java b/test/src/test/java/hudson/model/BuildAuthorizationTokenTest.java index 01ea0f35db..cdf2f588b5 100644 --- a/test/src/test/java/hudson/model/BuildAuthorizationTokenTest.java +++ b/test/src/test/java/hudson/model/BuildAuthorizationTokenTest.java @@ -15,7 +15,7 @@ import jenkins.model.Jenkins; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.collection.IsCollectionWithSize.hasSize; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.fail; public class BuildAuthorizationTokenTest { diff --git a/test/src/test/java/hudson/model/CauseTest.java b/test/src/test/java/hudson/model/CauseTest.java index c358d6216d..9ebbc38d70 100644 --- a/test/src/test/java/hudson/model/CauseTest.java +++ b/test/src/test/java/hudson/model/CauseTest.java @@ -33,7 +33,7 @@ import java.util.regex.Pattern; import static org.hamcrest.CoreMatchers.containsString; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import hudson.util.StreamTaskListener; diff --git a/test/src/test/java/hudson/model/ComputerSetTest.java b/test/src/test/java/hudson/model/ComputerSetTest.java index c9f029727b..2e7a1bdb93 100644 --- a/test/src/test/java/hudson/model/ComputerSetTest.java +++ b/test/src/test/java/hudson/model/ComputerSetTest.java @@ -27,7 +27,7 @@ import com.gargoylesoftware.htmlunit.html.HtmlForm; import hudson.cli.CLICommandInvoker; import hudson.slaves.DumbSlave; import static org.hamcrest.Matchers.*; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import org.junit.Rule; import org.junit.Test; import org.jvnet.hudson.test.Issue; diff --git a/test/src/test/java/hudson/model/DescriptorTest.java b/test/src/test/java/hudson/model/DescriptorTest.java index e30a181046..16c912bad6 100644 --- a/test/src/test/java/hudson/model/DescriptorTest.java +++ b/test/src/test/java/hudson/model/DescriptorTest.java @@ -40,7 +40,7 @@ import net.sf.json.JSONObject; import static org.hamcrest.Matchers.containsString; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; diff --git a/test/src/test/java/hudson/model/DescriptorVisibilityFilterTest.java b/test/src/test/java/hudson/model/DescriptorVisibilityFilterTest.java index ad2712b540..b014e52ea0 100644 --- a/test/src/test/java/hudson/model/DescriptorVisibilityFilterTest.java +++ b/test/src/test/java/hudson/model/DescriptorVisibilityFilterTest.java @@ -5,7 +5,7 @@ import static org.hamcrest.Matchers.emptyIterable; import static org.hamcrest.Matchers.endsWith; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.allOf; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import com.gargoylesoftware.htmlunit.html.HtmlPage; import hudson.security.ACL; diff --git a/test/src/test/java/hudson/model/DirectlyModifiableViewTest.java b/test/src/test/java/hudson/model/DirectlyModifiableViewTest.java index da68e63abb..0c01538fb9 100644 --- a/test/src/test/java/hudson/model/DirectlyModifiableViewTest.java +++ b/test/src/test/java/hudson/model/DirectlyModifiableViewTest.java @@ -24,7 +24,7 @@ package hudson.model; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import java.io.IOException; diff --git a/test/src/test/java/hudson/model/DirectoryBrowserSupportTest.java b/test/src/test/java/hudson/model/DirectoryBrowserSupportTest.java index 7186f02917..dbc38db1bc 100644 --- a/test/src/test/java/hudson/model/DirectoryBrowserSupportTest.java +++ b/test/src/test/java/hudson/model/DirectoryBrowserSupportTest.java @@ -59,7 +59,7 @@ import static org.hamcrest.CoreMatchers.not; import static org.hamcrest.Matchers.*; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; diff --git a/test/src/test/java/hudson/model/ExecutorTest.java b/test/src/test/java/hudson/model/ExecutorTest.java index 1db04eca2e..356d44c0c2 100644 --- a/test/src/test/java/hudson/model/ExecutorTest.java +++ b/test/src/test/java/hudson/model/ExecutorTest.java @@ -3,7 +3,7 @@ package hudson.model; import static org.hamcrest.Matchers.*; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; diff --git a/test/src/test/java/hudson/model/FileParameterValueTest.java b/test/src/test/java/hudson/model/FileParameterValueTest.java index 74a2bd2485..cd52684ecd 100644 --- a/test/src/test/java/hudson/model/FileParameterValueTest.java +++ b/test/src/test/java/hudson/model/FileParameterValueTest.java @@ -44,7 +44,7 @@ import static org.hamcrest.CoreMatchers.allOf; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.not; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; public class FileParameterValueTest { diff --git a/test/src/test/java/hudson/model/FingerprintTest.java b/test/src/test/java/hudson/model/FingerprintTest.java index cc93af32dd..62a783c4c8 100644 --- a/test/src/test/java/hudson/model/FingerprintTest.java +++ b/test/src/test/java/hudson/model/FingerprintTest.java @@ -58,7 +58,7 @@ import static org.hamcrest.Matchers.containsString; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.hamcrest.Matchers.notNullValue; diff --git a/test/src/test/java/hudson/model/FreeStyleProjectTest.java b/test/src/test/java/hudson/model/FreeStyleProjectTest.java index 1e0e0c9cd9..ebd46a53b4 100644 --- a/test/src/test/java/hudson/model/FreeStyleProjectTest.java +++ b/test/src/test/java/hudson/model/FreeStyleProjectTest.java @@ -27,7 +27,7 @@ import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotSame; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import com.gargoylesoftware.htmlunit.html.HtmlForm; import com.gargoylesoftware.htmlunit.html.HtmlPage; diff --git a/test/src/test/java/hudson/model/ItemGroupMixInTest.java b/test/src/test/java/hudson/model/ItemGroupMixInTest.java index 87bc6ecc71..2320371bf8 100644 --- a/test/src/test/java/hudson/model/ItemGroupMixInTest.java +++ b/test/src/test/java/hudson/model/ItemGroupMixInTest.java @@ -41,7 +41,7 @@ import java.io.IOException; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import org.junit.Rule; import org.junit.Test; diff --git a/test/src/test/java/hudson/model/ItemsTest.java b/test/src/test/java/hudson/model/ItemsTest.java index 8bb1eb0c76..b866dba911 100644 --- a/test/src/test/java/hudson/model/ItemsTest.java +++ b/test/src/test/java/hudson/model/ItemsTest.java @@ -52,7 +52,7 @@ import static org.hamcrest.Matchers.containsInAnyOrder; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import org.junit.Rule; diff --git a/test/src/test/java/hudson/model/JobTest.java b/test/src/test/java/hudson/model/JobTest.java index 08cbccbcae..263fcd0cbc 100644 --- a/test/src/test/java/hudson/model/JobTest.java +++ b/test/src/test/java/hudson/model/JobTest.java @@ -69,7 +69,7 @@ import static org.hamcrest.Matchers.endsWith; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.junit.Assume.assumeFalse; diff --git a/test/src/test/java/hudson/model/LabelLoadStatisticsQueueLengthTest.java b/test/src/test/java/hudson/model/LabelLoadStatisticsQueueLengthTest.java index 786a39db87..d62dcb2649 100644 --- a/test/src/test/java/hudson/model/LabelLoadStatisticsQueueLengthTest.java +++ b/test/src/test/java/hudson/model/LabelLoadStatisticsQueueLengthTest.java @@ -21,7 +21,7 @@ import java.util.Collections; import static org.hamcrest.Matchers.greaterThan; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; /** diff --git a/test/src/test/java/hudson/model/MyViewTest.java b/test/src/test/java/hudson/model/MyViewTest.java index 48aab001f1..c814ef7d53 100644 --- a/test/src/test/java/hudson/model/MyViewTest.java +++ b/test/src/test/java/hudson/model/MyViewTest.java @@ -36,7 +36,7 @@ import static org.hamcrest.Matchers.*; import org.junit.Rule; import org.jvnet.hudson.test.JenkinsRule; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assume.*; import org.jvnet.hudson.test.LoggerRule; @@ -111,4 +111,4 @@ public class MyViewTest { } -} \ No newline at end of file +} diff --git a/test/src/test/java/hudson/model/NodeTest.java b/test/src/test/java/hudson/model/NodeTest.java index a21752f873..33d40b2b60 100644 --- a/test/src/test/java/hudson/model/NodeTest.java +++ b/test/src/test/java/hudson/model/NodeTest.java @@ -60,7 +60,7 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; diff --git a/test/src/test/java/hudson/model/ParametersAction2Test.java b/test/src/test/java/hudson/model/ParametersAction2Test.java index 1780a9a6e1..ef6e066028 100644 --- a/test/src/test/java/hudson/model/ParametersAction2Test.java +++ b/test/src/test/java/hudson/model/ParametersAction2Test.java @@ -14,7 +14,7 @@ import java.util.logging.Level; import static org.hamcrest.CoreMatchers.*; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import org.junit.Rule; import org.junit.Test; diff --git a/test/src/test/java/hudson/model/PeriodicWorkTest.java b/test/src/test/java/hudson/model/PeriodicWorkTest.java index fc91dabfde..9c4b6c1f13 100644 --- a/test/src/test/java/hudson/model/PeriodicWorkTest.java +++ b/test/src/test/java/hudson/model/PeriodicWorkTest.java @@ -11,7 +11,7 @@ import hudson.ExtensionList; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class PeriodicWorkTest { diff --git a/test/src/test/java/hudson/model/QueueSEC1537Test.java b/test/src/test/java/hudson/model/QueueSEC1537Test.java index a2e85d7741..60ab631e01 100644 --- a/test/src/test/java/hudson/model/QueueSEC1537Test.java +++ b/test/src/test/java/hudson/model/QueueSEC1537Test.java @@ -14,7 +14,7 @@ import org.jvnet.hudson.test.JenkinsRule; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.not; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; //TODO merge into QueueTest after security patch public class QueueSEC1537Test { diff --git a/test/src/test/java/hudson/model/QueueTest.java b/test/src/test/java/hudson/model/QueueTest.java index 3ffbfa83e6..1c391d7cb8 100644 --- a/test/src/test/java/hudson/model/QueueTest.java +++ b/test/src/test/java/hudson/model/QueueTest.java @@ -143,7 +143,7 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import org.junit.Ignore; diff --git a/test/src/test/java/hudson/model/RSSTest.java b/test/src/test/java/hudson/model/RSSTest.java index 4e3aed4c46..e4586d103a 100644 --- a/test/src/test/java/hudson/model/RSSTest.java +++ b/test/src/test/java/hudson/model/RSSTest.java @@ -50,7 +50,7 @@ import static org.hamcrest.Matchers.*; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.fail; public class RSSTest { diff --git a/test/src/test/java/hudson/model/RunActionTest.java b/test/src/test/java/hudson/model/RunActionTest.java index f8b2acb0d2..607e6d2732 100644 --- a/test/src/test/java/hudson/model/RunActionTest.java +++ b/test/src/test/java/hudson/model/RunActionTest.java @@ -28,7 +28,7 @@ import hudson.XmlFile; import java.io.File; import static org.hamcrest.Matchers.*; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import org.junit.Rule; import org.junit.Test; import org.junit.runners.model.Statement; diff --git a/test/src/test/java/hudson/model/SlaveTest.java b/test/src/test/java/hudson/model/SlaveTest.java index cc6fce401a..1f20cb9516 100644 --- a/test/src/test/java/hudson/model/SlaveTest.java +++ b/test/src/test/java/hudson/model/SlaveTest.java @@ -53,7 +53,7 @@ import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.fail; import static org.junit.Assume.assumeThat; import org.junit.Rule; diff --git a/test/src/test/java/hudson/model/UpdateCenterCustomTest.java b/test/src/test/java/hudson/model/UpdateCenterCustomTest.java index 6c6f8083a6..a3f5bfe25c 100644 --- a/test/src/test/java/hudson/model/UpdateCenterCustomTest.java +++ b/test/src/test/java/hudson/model/UpdateCenterCustomTest.java @@ -26,7 +26,7 @@ package hudson.model; import javax.servlet.ServletContext; import static org.hamcrest.Matchers.instanceOf; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import org.junit.Rule; import org.junit.Test; import org.jvnet.hudson.test.JenkinsRule; diff --git a/test/src/test/java/hudson/model/UsageStatisticsTest.java b/test/src/test/java/hudson/model/UsageStatisticsTest.java index e1b596b666..6f44f30959 100644 --- a/test/src/test/java/hudson/model/UsageStatisticsTest.java +++ b/test/src/test/java/hudson/model/UsageStatisticsTest.java @@ -55,7 +55,7 @@ import java.util.zip.GZIPInputStream; import static org.hamcrest.Matchers.*; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import org.jvnet.hudson.test.TestPluginManager; diff --git a/test/src/test/java/hudson/model/UserIdMigratorTest.java b/test/src/test/java/hudson/model/UserIdMigratorTest.java index 733a6a8b09..c9a530585b 100644 --- a/test/src/test/java/hudson/model/UserIdMigratorTest.java +++ b/test/src/test/java/hudson/model/UserIdMigratorTest.java @@ -32,7 +32,7 @@ import org.jvnet.hudson.test.recipes.LocalData; import java.io.IOException; import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class UserIdMigratorTest { diff --git a/test/src/test/java/hudson/model/UserPropertyTest.java b/test/src/test/java/hudson/model/UserPropertyTest.java index 9ec5ee4880..6eee0b57dd 100644 --- a/test/src/test/java/hudson/model/UserPropertyTest.java +++ b/test/src/test/java/hudson/model/UserPropertyTest.java @@ -25,7 +25,7 @@ import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; import static org.hamcrest.core.IsNull.notNullValue; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; /** * @author Kohsuke Kawaguchi diff --git a/test/src/test/java/hudson/model/UserRestartTest.java b/test/src/test/java/hudson/model/UserRestartTest.java index 03754f85d7..4edad9fb4c 100644 --- a/test/src/test/java/hudson/model/UserRestartTest.java +++ b/test/src/test/java/hudson/model/UserRestartTest.java @@ -44,7 +44,7 @@ import static org.hamcrest.Matchers.not; import static org.hamcrest.core.IsEqual.equalTo; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class UserRestartTest { diff --git a/test/src/test/java/hudson/model/UserTest.java b/test/src/test/java/hudson/model/UserTest.java index cf63fc96de..015d8a2cb6 100644 --- a/test/src/test/java/hudson/model/UserTest.java +++ b/test/src/test/java/hudson/model/UserTest.java @@ -71,7 +71,7 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; diff --git a/test/src/test/java/hudson/model/ViewTest.java b/test/src/test/java/hudson/model/ViewTest.java index 913bbbf7f4..56788830e6 100644 --- a/test/src/test/java/hudson/model/ViewTest.java +++ b/test/src/test/java/hudson/model/ViewTest.java @@ -76,7 +76,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.mockito.BDDMockito.given; diff --git a/test/src/test/java/hudson/model/listeners/ItemListenerTest.java b/test/src/test/java/hudson/model/listeners/ItemListenerTest.java index ad1a185757..415320088d 100644 --- a/test/src/test/java/hudson/model/listeners/ItemListenerTest.java +++ b/test/src/test/java/hudson/model/listeners/ItemListenerTest.java @@ -28,7 +28,7 @@ import hudson.model.Item; import java.io.ByteArrayInputStream; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import org.junit.Before; import org.junit.Rule; import org.junit.Test; diff --git a/test/src/test/java/hudson/model/queue/BuildKeepsRunningWhenFaultySubTasksTest.java b/test/src/test/java/hudson/model/queue/BuildKeepsRunningWhenFaultySubTasksTest.java index 2836d4072f..d441d50470 100644 --- a/test/src/test/java/hudson/model/queue/BuildKeepsRunningWhenFaultySubTasksTest.java +++ b/test/src/test/java/hudson/model/queue/BuildKeepsRunningWhenFaultySubTasksTest.java @@ -19,7 +19,7 @@ import java.util.Collections; import java.util.concurrent.TimeUnit; import static org.hamcrest.Matchers.notNullValue; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class BuildKeepsRunningWhenFaultySubTasksTest { @Rule diff --git a/test/src/test/java/hudson/model/queue/QueueTaskDispatcherTest.java b/test/src/test/java/hudson/model/queue/QueueTaskDispatcherTest.java index e768d68fda..44da021453 100644 --- a/test/src/test/java/hudson/model/queue/QueueTaskDispatcherTest.java +++ b/test/src/test/java/hudson/model/queue/QueueTaskDispatcherTest.java @@ -11,7 +11,7 @@ import java.util.logging.Level; import static org.hamcrest.Matchers.containsString; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import org.junit.Rule; import org.junit.Test; diff --git a/test/src/test/java/hudson/scm/AbstractScmTagActionTest.java b/test/src/test/java/hudson/scm/AbstractScmTagActionTest.java index a0b931d12a..755d3b7ba3 100644 --- a/test/src/test/java/hudson/scm/AbstractScmTagActionTest.java +++ b/test/src/test/java/hudson/scm/AbstractScmTagActionTest.java @@ -47,7 +47,7 @@ import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.startsWith; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class AbstractScmTagActionTest { diff --git a/test/src/test/java/hudson/security/HudsonPrivateSecurityRealmTest.java b/test/src/test/java/hudson/security/HudsonPrivateSecurityRealmTest.java index 1d587423f3..096b5a2d6e 100644 --- a/test/src/test/java/hudson/security/HudsonPrivateSecurityRealmTest.java +++ b/test/src/test/java/hudson/security/HudsonPrivateSecurityRealmTest.java @@ -58,7 +58,7 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import org.apache.commons.lang.StringUtils; diff --git a/test/src/test/java/hudson/security/SecurityRealmTest.java b/test/src/test/java/hudson/security/SecurityRealmTest.java index da4f4a05e7..11f7efa730 100644 --- a/test/src/test/java/hudson/security/SecurityRealmTest.java +++ b/test/src/test/java/hudson/security/SecurityRealmTest.java @@ -43,7 +43,7 @@ import java.util.Random; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class SecurityRealmTest { diff --git a/test/src/test/java/hudson/security/TokenBasedRememberMeServices2Test.java b/test/src/test/java/hudson/security/TokenBasedRememberMeServices2Test.java index 32e2b099d5..4353fe3051 100644 --- a/test/src/test/java/hudson/security/TokenBasedRememberMeServices2Test.java +++ b/test/src/test/java/hudson/security/TokenBasedRememberMeServices2Test.java @@ -44,7 +44,7 @@ import static org.hamcrest.Matchers.not; import static org.hamcrest.text.IsEmptyString.isEmptyString; import static org.hamcrest.xml.HasXPath.hasXPath; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class TokenBasedRememberMeServices2Test { diff --git a/test/src/test/java/hudson/security/csrf/CrumbExclusionTest.java b/test/src/test/java/hudson/security/csrf/CrumbExclusionTest.java index 8d2a61d95b..06d5058376 100644 --- a/test/src/test/java/hudson/security/csrf/CrumbExclusionTest.java +++ b/test/src/test/java/hudson/security/csrf/CrumbExclusionTest.java @@ -42,7 +42,7 @@ import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.fail; import org.junit.Rule; import org.jvnet.hudson.test.Issue; diff --git a/test/src/test/java/hudson/security/csrf/DefaultCrumbIssuerSEC1491Test.java b/test/src/test/java/hudson/security/csrf/DefaultCrumbIssuerSEC1491Test.java index c25cc8880a..d7ca4bb0c1 100644 --- a/test/src/test/java/hudson/security/csrf/DefaultCrumbIssuerSEC1491Test.java +++ b/test/src/test/java/hudson/security/csrf/DefaultCrumbIssuerSEC1491Test.java @@ -13,7 +13,7 @@ import org.junit.Assert; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.fail; import org.junit.Before; import org.junit.Rule; diff --git a/test/src/test/java/hudson/security/csrf/DefaultCrumbIssuerSEC1704Test.java b/test/src/test/java/hudson/security/csrf/DefaultCrumbIssuerSEC1704Test.java index 9ae487d23a..3de8ae9372 100644 --- a/test/src/test/java/hudson/security/csrf/DefaultCrumbIssuerSEC1704Test.java +++ b/test/src/test/java/hudson/security/csrf/DefaultCrumbIssuerSEC1704Test.java @@ -21,7 +21,7 @@ import org.jvnet.hudson.test.JenkinsRule.WebClient; import static org.hamcrest.Matchers.equalTo; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; diff --git a/test/src/test/java/hudson/security/csrf/DefaultCrumbIssuerSEC626Test.java b/test/src/test/java/hudson/security/csrf/DefaultCrumbIssuerSEC626Test.java index 3fb737dd86..e20e269db9 100644 --- a/test/src/test/java/hudson/security/csrf/DefaultCrumbIssuerSEC626Test.java +++ b/test/src/test/java/hudson/security/csrf/DefaultCrumbIssuerSEC626Test.java @@ -13,7 +13,7 @@ import hudson.model.User; import javax.servlet.http.HttpServletResponse; import static org.hamcrest.Matchers.*; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.fail; import org.junit.Before; import org.junit.Rule; diff --git a/test/src/test/java/hudson/slaves/CloudTest.java b/test/src/test/java/hudson/slaves/CloudTest.java index 623a864b6f..b2772f7b35 100644 --- a/test/src/test/java/hudson/slaves/CloudTest.java +++ b/test/src/test/java/hudson/slaves/CloudTest.java @@ -5,7 +5,7 @@ import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.instanceOf; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import com.gargoylesoftware.htmlunit.html.HtmlPage; diff --git a/test/src/test/java/hudson/slaves/JNLPLauncherTest.java b/test/src/test/java/hudson/slaves/JNLPLauncherTest.java index a60c4dc687..cfd3f54aa0 100644 --- a/test/src/test/java/hudson/slaves/JNLPLauncherTest.java +++ b/test/src/test/java/hudson/slaves/JNLPLauncherTest.java @@ -52,7 +52,7 @@ import java.util.concurrent.TimeUnit; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.fail; import java.awt.*; diff --git a/test/src/test/java/hudson/tasks/ArtifactArchiverTest.java b/test/src/test/java/hudson/tasks/ArtifactArchiverTest.java index 275527d692..87d580f94b 100644 --- a/test/src/test/java/hudson/tasks/ArtifactArchiverTest.java +++ b/test/src/test/java/hudson/tasks/ArtifactArchiverTest.java @@ -57,7 +57,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assume.*; import org.junit.ClassRule; diff --git a/test/src/test/java/hudson/tasks/FingerprinterTest.java b/test/src/test/java/hudson/tasks/FingerprinterTest.java index 1b0339fb41..5ede73a7c5 100644 --- a/test/src/test/java/hudson/tasks/FingerprinterTest.java +++ b/test/src/test/java/hudson/tasks/FingerprinterTest.java @@ -48,7 +48,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import hudson.util.StreamTaskListener; diff --git a/test/src/test/java/hudson/tasks/LogRotatorTest.java b/test/src/test/java/hudson/tasks/LogRotatorTest.java index 1990b3bc82..06e29d814a 100644 --- a/test/src/test/java/hudson/tasks/LogRotatorTest.java +++ b/test/src/test/java/hudson/tasks/LogRotatorTest.java @@ -27,7 +27,7 @@ import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import hudson.Launcher; diff --git a/test/src/test/java/hudson/tools/ZipExtractionInstallerTest.java b/test/src/test/java/hudson/tools/ZipExtractionInstallerTest.java index a22cc27140..813b30f43a 100644 --- a/test/src/test/java/hudson/tools/ZipExtractionInstallerTest.java +++ b/test/src/test/java/hudson/tools/ZipExtractionInstallerTest.java @@ -56,7 +56,7 @@ import java.util.List; import static org.hamcrest.Matchers.containsString; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.fail; public class ZipExtractionInstallerTest { diff --git a/test/src/test/java/hudson/util/AlternativeUiTextProviderTest.java b/test/src/test/java/hudson/util/AlternativeUiTextProviderTest.java index 5afe78cbd9..18ac9ed97f 100644 --- a/test/src/test/java/hudson/util/AlternativeUiTextProviderTest.java +++ b/test/src/test/java/hudson/util/AlternativeUiTextProviderTest.java @@ -29,7 +29,7 @@ import hudson.model.ParametersDefinitionProperty; import hudson.model.StringParameterDefinition; import jenkins.model.ParameterizedJobMixIn; import static org.hamcrest.Matchers.containsString; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import org.junit.Rule; import org.junit.Test; import org.jvnet.hudson.test.Issue; diff --git a/test/src/test/java/hudson/util/HudsonIsLoadingTest.java b/test/src/test/java/hudson/util/HudsonIsLoadingTest.java index f0efc3e269..d8b51beb2b 100644 --- a/test/src/test/java/hudson/util/HudsonIsLoadingTest.java +++ b/test/src/test/java/hudson/util/HudsonIsLoadingTest.java @@ -9,7 +9,7 @@ import org.jvnet.hudson.test.JenkinsRule; import static javax.servlet.http.HttpServletResponse.SC_SERVICE_UNAVAILABLE; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; public class HudsonIsLoadingTest { diff --git a/test/src/test/java/hudson/util/HudsonIsRestartingTest.java b/test/src/test/java/hudson/util/HudsonIsRestartingTest.java index 3e9ed94ac4..7c35952962 100644 --- a/test/src/test/java/hudson/util/HudsonIsRestartingTest.java +++ b/test/src/test/java/hudson/util/HudsonIsRestartingTest.java @@ -9,7 +9,7 @@ import org.jvnet.hudson.test.JenkinsRule; import static javax.servlet.http.HttpServletResponse.SC_SERVICE_UNAVAILABLE; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; public class HudsonIsRestartingTest { diff --git a/test/src/test/java/hudson/util/SecretCompatTest.java b/test/src/test/java/hudson/util/SecretCompatTest.java index b0c18508c7..758031553b 100644 --- a/test/src/test/java/hudson/util/SecretCompatTest.java +++ b/test/src/test/java/hudson/util/SecretCompatTest.java @@ -40,7 +40,7 @@ import static org.hamcrest.core.IsNot.not; import static org.hamcrest.core.StringContains.containsString; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; /** diff --git a/test/src/test/java/hudson/views/GlobalDefaultViewConfigurationTest.java b/test/src/test/java/hudson/views/GlobalDefaultViewConfigurationTest.java index 41e9bf8925..7786f3549f 100644 --- a/test/src/test/java/hudson/views/GlobalDefaultViewConfigurationTest.java +++ b/test/src/test/java/hudson/views/GlobalDefaultViewConfigurationTest.java @@ -27,7 +27,7 @@ import hudson.model.Descriptor; import net.sf.json.JSONObject; import static org.hamcrest.Matchers.*; import org.junit.Assert; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import org.junit.Rule; import org.junit.Test; import org.jvnet.hudson.test.Issue; diff --git a/test/src/test/java/jenkins/ExtensionFilterTest.java b/test/src/test/java/jenkins/ExtensionFilterTest.java index abc0a66b6a..227add1324 100644 --- a/test/src/test/java/jenkins/ExtensionFilterTest.java +++ b/test/src/test/java/jenkins/ExtensionFilterTest.java @@ -1,7 +1,7 @@ package jenkins; import static org.hamcrest.Matchers.hasSize; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import hudson.ExtensionComponent; diff --git a/test/src/test/java/jenkins/install/InstallStateTest.java b/test/src/test/java/jenkins/install/InstallStateTest.java index c6debf2c5f..d81dc4c14a 100644 --- a/test/src/test/java/jenkins/install/InstallStateTest.java +++ b/test/src/test/java/jenkins/install/InstallStateTest.java @@ -27,7 +27,7 @@ import hudson.ExtensionList; import jenkins.model.Jenkins; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.instanceOf; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import org.junit.Rule; import org.junit.Test; diff --git a/test/src/test/java/jenkins/install/LoadDetachedPluginsTest.java b/test/src/test/java/jenkins/install/LoadDetachedPluginsTest.java index 2b500e4cb3..bd985e0057 100644 --- a/test/src/test/java/jenkins/install/LoadDetachedPluginsTest.java +++ b/test/src/test/java/jenkins/install/LoadDetachedPluginsTest.java @@ -49,7 +49,7 @@ import org.jvnet.hudson.test.recipes.LocalData; import static org.hamcrest.Matchers.*; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import org.jvnet.hudson.test.LoggerRule; diff --git a/test/src/test/java/jenkins/install/SetupWizardTest.java b/test/src/test/java/jenkins/install/SetupWizardTest.java index fd495e9ea1..e1a14b1dd9 100644 --- a/test/src/test/java/jenkins/install/SetupWizardTest.java +++ b/test/src/test/java/jenkins/install/SetupWizardTest.java @@ -39,7 +39,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.experimental.categories.Category; import org.jvnet.hudson.test.JenkinsRule; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import org.junit.rules.TemporaryFolder; import org.jvnet.hudson.test.Issue; import org.jvnet.hudson.test.SmokeTest; diff --git a/test/src/test/java/jenkins/model/GlobalSCMRetryCountConfigurationTest.java b/test/src/test/java/jenkins/model/GlobalSCMRetryCountConfigurationTest.java index 9ea926f264..5e8903c191 100644 --- a/test/src/test/java/jenkins/model/GlobalSCMRetryCountConfigurationTest.java +++ b/test/src/test/java/jenkins/model/GlobalSCMRetryCountConfigurationTest.java @@ -24,7 +24,7 @@ package jenkins.model; import static org.hamcrest.CoreMatchers.equalTo; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import hudson.model.Descriptor; import net.sf.json.JSONObject; diff --git a/test/src/test/java/jenkins/model/JenkinsBuildsAndWorkspacesDirectoriesTest.java b/test/src/test/java/jenkins/model/JenkinsBuildsAndWorkspacesDirectoriesTest.java index cfd65dae9d..7073c47761 100644 --- a/test/src/test/java/jenkins/model/JenkinsBuildsAndWorkspacesDirectoriesTest.java +++ b/test/src/test/java/jenkins/model/JenkinsBuildsAndWorkspacesDirectoriesTest.java @@ -29,7 +29,7 @@ import java.util.stream.Stream; import static org.hamcrest.CoreMatchers.containsString; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.junit.Assume.assumeFalse; diff --git a/test/src/test/java/jenkins/model/JenkinsSystemReadAndManagePermissionTest.java b/test/src/test/java/jenkins/model/JenkinsSystemReadAndManagePermissionTest.java index 67c954ca6e..5245314df2 100644 --- a/test/src/test/java/jenkins/model/JenkinsSystemReadAndManagePermissionTest.java +++ b/test/src/test/java/jenkins/model/JenkinsSystemReadAndManagePermissionTest.java @@ -14,7 +14,7 @@ import org.kohsuke.stapler.DataBoundSetter; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class JenkinsSystemReadAndManagePermissionTest { diff --git a/test/src/test/java/jenkins/model/JenkinsSystemReadPermissionTest.java b/test/src/test/java/jenkins/model/JenkinsSystemReadPermissionTest.java index 31501bf54e..dec2414aa5 100644 --- a/test/src/test/java/jenkins/model/JenkinsSystemReadPermissionTest.java +++ b/test/src/test/java/jenkins/model/JenkinsSystemReadPermissionTest.java @@ -11,7 +11,7 @@ import org.jvnet.hudson.test.JenkinsRule; import org.jvnet.hudson.test.MockAuthorizationStrategy; import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class JenkinsSystemReadPermissionTest { diff --git a/test/src/test/java/jenkins/model/NodesTest.java b/test/src/test/java/jenkins/model/NodesTest.java index 5e6f57b775..512ee5d0b3 100644 --- a/test/src/test/java/jenkins/model/NodesTest.java +++ b/test/src/test/java/jenkins/model/NodesTest.java @@ -42,7 +42,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.fail; public class NodesTest { diff --git a/test/src/test/java/jenkins/model/PeepholePermalinkTest.java b/test/src/test/java/jenkins/model/PeepholePermalinkTest.java index 64fbf7ae6f..ddf285da42 100644 --- a/test/src/test/java/jenkins/model/PeepholePermalinkTest.java +++ b/test/src/test/java/jenkins/model/PeepholePermalinkTest.java @@ -8,7 +8,7 @@ import java.nio.file.Files; import java.util.logging.Level; import static org.hamcrest.Matchers.*; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import org.junit.Rule; import org.junit.Test; import org.jvnet.hudson.test.FailureBuilder; diff --git a/test/src/test/java/jenkins/model/TransientActionFactoryTest.java b/test/src/test/java/jenkins/model/TransientActionFactoryTest.java index e6a592be92..7510890730 100644 --- a/test/src/test/java/jenkins/model/TransientActionFactoryTest.java +++ b/test/src/test/java/jenkins/model/TransientActionFactoryTest.java @@ -57,7 +57,7 @@ import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class TransientActionFactoryTest { diff --git a/test/src/test/java/jenkins/model/identity/IdentityRootActionTest.java b/test/src/test/java/jenkins/model/identity/IdentityRootActionTest.java index 8602b97c01..4c4b11df2b 100644 --- a/test/src/test/java/jenkins/model/identity/IdentityRootActionTest.java +++ b/test/src/test/java/jenkins/model/identity/IdentityRootActionTest.java @@ -8,7 +8,7 @@ import org.junit.Test; import org.jvnet.hudson.test.JenkinsRule; import static org.hamcrest.Matchers.containsString; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class IdentityRootActionTest { diff --git a/test/src/test/java/jenkins/security/ApiTokenPropertyTest.java b/test/src/test/java/jenkins/security/ApiTokenPropertyTest.java index 7226f27242..113cbd070f 100644 --- a/test/src/test/java/jenkins/security/ApiTokenPropertyTest.java +++ b/test/src/test/java/jenkins/security/ApiTokenPropertyTest.java @@ -8,7 +8,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.fail; import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; diff --git a/test/src/test/java/jenkins/security/BasicHeaderApiTokenAuthenticatorTest.java b/test/src/test/java/jenkins/security/BasicHeaderApiTokenAuthenticatorTest.java index e61b7f297c..d2e0fae085 100644 --- a/test/src/test/java/jenkins/security/BasicHeaderApiTokenAuthenticatorTest.java +++ b/test/src/test/java/jenkins/security/BasicHeaderApiTokenAuthenticatorTest.java @@ -52,7 +52,7 @@ import static org.hamcrest.Matchers.is; import static org.hamcrest.xml.HasXPath.hasXPath; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class BasicHeaderApiTokenAuthenticatorTest { @Rule diff --git a/test/src/test/java/jenkins/security/ClassFilterImplTest.java b/test/src/test/java/jenkins/security/ClassFilterImplTest.java index e77362e066..6f4764eb6e 100644 --- a/test/src/test/java/jenkins/security/ClassFilterImplTest.java +++ b/test/src/test/java/jenkins/security/ClassFilterImplTest.java @@ -48,7 +48,7 @@ import org.junit.Test; import static org.hamcrest.Matchers.*; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assume.*; import org.junit.ClassRule; import org.junit.Rule; diff --git a/test/src/test/java/jenkins/security/RedactSecretJsonInErrorMessageSanitizerHtmlTest.java b/test/src/test/java/jenkins/security/RedactSecretJsonInErrorMessageSanitizerHtmlTest.java index 9fae40fd01..7ce3f01cbf 100644 --- a/test/src/test/java/jenkins/security/RedactSecretJsonInErrorMessageSanitizerHtmlTest.java +++ b/test/src/test/java/jenkins/security/RedactSecretJsonInErrorMessageSanitizerHtmlTest.java @@ -55,7 +55,7 @@ import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.hasItem; import static org.hamcrest.CoreMatchers.not; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; @Restricted(NoExternalUse.class) public class RedactSecretJsonInErrorMessageSanitizerHtmlTest { diff --git a/test/src/test/java/jenkins/security/Security218Test.java b/test/src/test/java/jenkins/security/Security218Test.java index 2bac8f16bd..6d4f89a9fd 100644 --- a/test/src/test/java/jenkins/security/Security218Test.java +++ b/test/src/test/java/jenkins/security/Security218Test.java @@ -21,7 +21,7 @@ import org.apache.commons.io.FileUtils; import org.codehaus.groovy.runtime.MethodClosure; import static org.hamcrest.Matchers.containsString; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.fail; import org.junit.rules.TemporaryFolder; import org.jvnet.hudson.test.LoggerRule; diff --git a/test/src/test/java/jenkins/security/Security637Test.java b/test/src/test/java/jenkins/security/Security637Test.java index 51d8000e31..c29b81aa85 100644 --- a/test/src/test/java/jenkins/security/Security637Test.java +++ b/test/src/test/java/jenkins/security/Security637Test.java @@ -51,7 +51,7 @@ import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.not; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import org.junit.Ignore; public class Security637Test { diff --git a/test/src/test/java/jenkins/security/apitoken/ApiTokenStatsRestartTest.java b/test/src/test/java/jenkins/security/apitoken/ApiTokenStatsRestartTest.java index b2f322a171..ac5b09ce95 100644 --- a/test/src/test/java/jenkins/security/apitoken/ApiTokenStatsRestartTest.java +++ b/test/src/test/java/jenkins/security/apitoken/ApiTokenStatsRestartTest.java @@ -54,7 +54,7 @@ import static org.hamcrest.Matchers.not; import static org.hamcrest.xml.HasXPath.hasXPath; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; diff --git a/test/src/test/java/jenkins/security/apitoken/ApiTokenStatsTest.java b/test/src/test/java/jenkins/security/apitoken/ApiTokenStatsTest.java index c436ceb38f..cfebf7f8ef 100644 --- a/test/src/test/java/jenkins/security/apitoken/ApiTokenStatsTest.java +++ b/test/src/test/java/jenkins/security/apitoken/ApiTokenStatsTest.java @@ -48,7 +48,7 @@ import static org.hamcrest.Matchers.not; import static org.hamcrest.xml.HasXPath.hasXPath; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.fail; public class ApiTokenStatsTest { diff --git a/test/src/test/java/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitorTest.java b/test/src/test/java/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitorTest.java index 7fbea41d0b..855e920f68 100644 --- a/test/src/test/java/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitorTest.java +++ b/test/src/test/java/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitorTest.java @@ -44,7 +44,7 @@ import org.jvnet.hudson.test.JenkinsRule; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; public class LegacyApiTokenAdministrativeMonitorTest { diff --git a/test/src/test/java/jenkins/security/s2m/DefaultFilePathFilterTest.java b/test/src/test/java/jenkins/security/s2m/DefaultFilePathFilterTest.java index c6d8eace8d..7c06927e56 100644 --- a/test/src/test/java/jenkins/security/s2m/DefaultFilePathFilterTest.java +++ b/test/src/test/java/jenkins/security/s2m/DefaultFilePathFilterTest.java @@ -36,7 +36,7 @@ import org.junit.Before; import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import org.junit.Rule; diff --git a/test/src/test/java/jenkins/security/seed/UserSeedChangeListenerTest.java b/test/src/test/java/jenkins/security/seed/UserSeedChangeListenerTest.java index 5ff9f4d771..585801e558 100644 --- a/test/src/test/java/jenkins/security/seed/UserSeedChangeListenerTest.java +++ b/test/src/test/java/jenkins/security/seed/UserSeedChangeListenerTest.java @@ -37,7 +37,7 @@ import java.net.URL; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class UserSeedChangeListenerTest { diff --git a/test/src/test/java/jenkins/security/seed/UserSeedPropertyTest.java b/test/src/test/java/jenkins/security/seed/UserSeedPropertyTest.java index 10772cd3a0..6f49263da9 100644 --- a/test/src/test/java/jenkins/security/seed/UserSeedPropertyTest.java +++ b/test/src/test/java/jenkins/security/seed/UserSeedPropertyTest.java @@ -49,7 +49,7 @@ import static org.hamcrest.xml.HasXPath.hasXPath; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.fail; public class UserSeedPropertyTest { diff --git a/test/src/test/java/jenkins/security/stapler/CustomRoutingDecisionProviderTest.java b/test/src/test/java/jenkins/security/stapler/CustomRoutingDecisionProviderTest.java index 750ddb28bc..c19dca7e36 100644 --- a/test/src/test/java/jenkins/security/stapler/CustomRoutingDecisionProviderTest.java +++ b/test/src/test/java/jenkins/security/stapler/CustomRoutingDecisionProviderTest.java @@ -40,7 +40,7 @@ import edu.umd.cs.findbugs.annotations.NonNull; import java.io.IOException; import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; @Issue("SECURITY-400") @For(RoutingDecisionProvider.class) diff --git a/test/src/test/java/jenkins/security/stapler/DynamicTest.java b/test/src/test/java/jenkins/security/stapler/DynamicTest.java index 764acbf06f..0b769ee1e0 100644 --- a/test/src/test/java/jenkins/security/stapler/DynamicTest.java +++ b/test/src/test/java/jenkins/security/stapler/DynamicTest.java @@ -11,7 +11,7 @@ import org.kohsuke.stapler.HttpResponses; import org.kohsuke.stapler.StaplerRequest; import static org.hamcrest.CoreMatchers.*; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import edu.umd.cs.findbugs.annotations.CheckForNull; import java.util.stream.Stream; diff --git a/test/src/test/java/jenkins/security/stapler/Security400Test.java b/test/src/test/java/jenkins/security/stapler/Security400Test.java index 78382f933f..519fabb6e9 100644 --- a/test/src/test/java/jenkins/security/stapler/Security400Test.java +++ b/test/src/test/java/jenkins/security/stapler/Security400Test.java @@ -64,7 +64,7 @@ import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.not; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; /** diff --git a/test/src/test/java/jenkins/security/stapler/Security867Test.java b/test/src/test/java/jenkins/security/stapler/Security867Test.java index 8d87df5c5a..3f3c28180d 100644 --- a/test/src/test/java/jenkins/security/stapler/Security867Test.java +++ b/test/src/test/java/jenkins/security/stapler/Security867Test.java @@ -37,7 +37,7 @@ import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.not; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class Security867Test { @Rule diff --git a/test/src/test/java/jenkins/security/stapler/StaplerAbstractTest.java b/test/src/test/java/jenkins/security/stapler/StaplerAbstractTest.java index b7ca0ebd05..7539951bfa 100644 --- a/test/src/test/java/jenkins/security/stapler/StaplerAbstractTest.java +++ b/test/src/test/java/jenkins/security/stapler/StaplerAbstractTest.java @@ -45,7 +45,7 @@ import java.net.URL; import static org.hamcrest.CoreMatchers.startsWith; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; diff --git a/test/src/test/java/jenkins/security/stapler/StaticRoutingDecisionProvider2Test.java b/test/src/test/java/jenkins/security/stapler/StaticRoutingDecisionProvider2Test.java index 06ebd0557e..2094ac54c6 100644 --- a/test/src/test/java/jenkins/security/stapler/StaticRoutingDecisionProvider2Test.java +++ b/test/src/test/java/jenkins/security/stapler/StaticRoutingDecisionProvider2Test.java @@ -38,7 +38,7 @@ import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.not; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; /** diff --git a/test/src/test/java/jenkins/slaves/OldRemotingAgentTest.java b/test/src/test/java/jenkins/slaves/OldRemotingAgentTest.java index a7c8d1536e..dbd64c48e9 100644 --- a/test/src/test/java/jenkins/slaves/OldRemotingAgentTest.java +++ b/test/src/test/java/jenkins/slaves/OldRemotingAgentTest.java @@ -64,7 +64,7 @@ import java.net.URISyntaxException; import java.util.Collection; import static org.hamcrest.CoreMatchers.*; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; /** * Tests for old Remoting agent versions diff --git a/test/src/test/java/jenkins/slaves/RemotingVersionInfoTest.java b/test/src/test/java/jenkins/slaves/RemotingVersionInfoTest.java index aeb6b5b29b..7671939577 100644 --- a/test/src/test/java/jenkins/slaves/RemotingVersionInfoTest.java +++ b/test/src/test/java/jenkins/slaves/RemotingVersionInfoTest.java @@ -38,7 +38,7 @@ import java.util.zip.ZipFile; import static org.hamcrest.Matchers.equalTo; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; @For(RemotingVersionInfo.class) public class RemotingVersionInfoTest { diff --git a/test/src/test/java/jenkins/telemetry/TelemetryTest.java b/test/src/test/java/jenkins/telemetry/TelemetryTest.java index 922356a149..47eb98cbf7 100644 --- a/test/src/test/java/jenkins/telemetry/TelemetryTest.java +++ b/test/src/test/java/jenkins/telemetry/TelemetryTest.java @@ -4,7 +4,7 @@ import hudson.ExtensionList; import hudson.model.UnprotectedRootAction; import static org.hamcrest.CoreMatchers.*; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import hudson.security.csrf.CrumbExclusion; diff --git a/test/src/test/java/jenkins/telemetry/impl/java11/MissingClassTelemetryFasterTest.java b/test/src/test/java/jenkins/telemetry/impl/java11/MissingClassTelemetryFasterTest.java index 2e5f152121..794ada273f 100644 --- a/test/src/test/java/jenkins/telemetry/impl/java11/MissingClassTelemetryFasterTest.java +++ b/test/src/test/java/jenkins/telemetry/impl/java11/MissingClassTelemetryFasterTest.java @@ -36,7 +36,7 @@ import java.util.logging.Logger; import static org.hamcrest.Matchers.not; import static org.hamcrest.core.StringContains.containsString; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; /** * Tests without a running Jenkins for Java11 Telemetry of ClassNotFoundException. diff --git a/test/src/test/java/jenkins/triggers/ReverseBuildTriggerTest.java b/test/src/test/java/jenkins/triggers/ReverseBuildTriggerTest.java index 6d20185b40..83e2bb146c 100644 --- a/test/src/test/java/jenkins/triggers/ReverseBuildTriggerTest.java +++ b/test/src/test/java/jenkins/triggers/ReverseBuildTriggerTest.java @@ -49,7 +49,7 @@ import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.core.IsNot.not; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import org.junit.Before; import org.junit.ClassRule; diff --git a/test/src/test/java/jenkins/util/JenkinsJVMRealTest.java b/test/src/test/java/jenkins/util/JenkinsJVMRealTest.java index 9ee9b705cb..5715d76133 100644 --- a/test/src/test/java/jenkins/util/JenkinsJVMRealTest.java +++ b/test/src/test/java/jenkins/util/JenkinsJVMRealTest.java @@ -8,7 +8,7 @@ import org.junit.Test; import org.jvnet.hudson.test.JenkinsRule; import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; public class JenkinsJVMRealTest { diff --git a/test/src/test/java/jenkins/util/SystemPropertiesTest.java b/test/src/test/java/jenkins/util/SystemPropertiesTest.java index 0a16536556..707abf7495 100644 --- a/test/src/test/java/jenkins/util/SystemPropertiesTest.java +++ b/test/src/test/java/jenkins/util/SystemPropertiesTest.java @@ -25,7 +25,7 @@ package jenkins.util; import javax.servlet.ServletContextEvent; import static org.hamcrest.Matchers.*; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import org.eclipse.jetty.server.handler.ContextHandler; import org.hamcrest.Matchers; diff --git a/test/src/test/java/lib/form/PasswordTest.java b/test/src/test/java/lib/form/PasswordTest.java index f2d0b0ede4..3bace7897d 100644 --- a/test/src/test/java/lib/form/PasswordTest.java +++ b/test/src/test/java/lib/form/PasswordTest.java @@ -49,7 +49,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import org.junit.Rule; import org.junit.Test; diff --git a/test/src/test/java/lib/form/ValidateButtonSEC1327Test.java b/test/src/test/java/lib/form/ValidateButtonSEC1327Test.java index 893291734a..5292d0870a 100644 --- a/test/src/test/java/lib/form/ValidateButtonSEC1327Test.java +++ b/test/src/test/java/lib/form/ValidateButtonSEC1327Test.java @@ -42,7 +42,7 @@ import java.util.concurrent.atomic.AtomicReference; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.nullValue; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; //TODO merge with ValidateButtonTest once security release done public class ValidateButtonSEC1327Test {