Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* JENKINS-51817 fix NPEs * JENKINS-51817 make sure message is not null
- Loading branch information
1 parent
c56204a
commit d6d6528
Showing
2 changed files
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/test/java/jenkins/scm/impl/subversion/RemotableSVNErrorMessageTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package jenkins.scm.impl.subversion; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Test; | ||
import org.tmatesoft.svn.core.SVNErrorCode; | ||
|
||
import static org.junit.Assert.assertNotNull; | ||
|
||
public class RemotableSVNErrorMessageTest { | ||
|
||
@Test | ||
public void shouldNotThrowNPEsInToString() { | ||
assertNotNull(new RemotableSVNErrorMessage(SVNErrorCode.APMOD_CONNECTION_ABORTED).toString()); | ||
assertNotNull(new RemotableSVNErrorMessage(SVNErrorCode.APMOD_CONNECTION_ABORTED, "message").toString()); | ||
assertNotNull(new RemotableSVNErrorMessage(SVNErrorCode.APMOD_CONNECTION_ABORTED, new Exception()).toString()); | ||
assertNotNull(new RemotableSVNErrorMessage(SVNErrorCode.APMOD_CONNECTION_ABORTED, "message", new Exception()).toString()); | ||
} | ||
|
||
} |