Skip to content

Commit c57bf05

Browse files
committed
Fix test matchers
1 parent ea11966 commit c57bf05

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • github-pullrequest-plugin/src/test/java/org/jenkinsci/plugins/github_integration/its

github-pullrequest-plugin/src/test/java/org/jenkinsci/plugins/github_integration/its/AbstractPRTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
import static org.hamcrest.MatcherAssert.assertThat;
5252
import static org.hamcrest.Matchers.is;
5353
import static org.hamcrest.Matchers.notNullValue;
54+
import static org.hamcrest.Matchers.nullValue;
5455
import static org.hamcrest.core.IsNot.not;
5556
import static org.jenkinsci.plugins.github.config.GitHubServerConfig.loginToGithub;
5657
import static org.jenkinsci.plugins.github.pullrequest.utils.JobHelper.ghPRTriggerFromJob;
@@ -165,10 +166,10 @@ public void basicTest() throws Exception {
165166

166167
j.waitUntilNoActivity();
167168

168-
assertThat(job.getLastBuild(), is(isNull()));
169+
assertThat(job.getLastBuild(), is(nullValue()));
169170

170171
GitHubPRRepository ghPRRepository = job.getAction(GitHubPRRepository.class);
171-
assertThat("Action storage should be available", ghPRRepository, not(isNull()));
172+
assertThat("Action storage should be available", ghPRRepository, notNullValue());
172173

173174
Map<Integer, GitHubPRPullRequest> pulls = ghPRRepository.getPulls();
174175
assertThat("Action storage should be empty", pulls.entrySet(), Matchers.hasSize(0));
@@ -182,7 +183,7 @@ public void basicTest() throws Exception {
182183

183184
// refresh objects
184185
ghPRRepository = job.getAction(GitHubPRRepository.class);
185-
assertThat("Action storage should be available", ghPRRepository, not(isNull()));
186+
assertThat("Action storage should be available", ghPRRepository, notNullValue());
186187

187188
pulls = ghPRRepository.getPulls();
188189
assertThat("Pull request 1 should appear in action storage", pulls.entrySet(), Matchers.hasSize(1));

0 commit comments

Comments
 (0)