-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#6 Tests for SeiImplementationMissingFailureAnalyzer and SeiImplement…
…ingClassNotFoundException.
- Loading branch information
1 parent
e47e239
commit 1077ecc
Showing
2 changed files
with
55 additions
and
2 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
30 changes: 30 additions & 0 deletions
30
...test/java/de/codecentric/cxf/diagnostics/SeiImplementationMissingFailureAnalyzerTest.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,30 @@ | ||
package de.codecentric.cxf.diagnostics; | ||
|
||
import de.codecentric.cxf.autodetection.WebServiceAutoDetector; | ||
import org.junit.Test; | ||
import org.springframework.boot.diagnostics.FailureAnalysis; | ||
|
||
import static org.hamcrest.CoreMatchers.containsString; | ||
import static org.hamcrest.MatcherAssert.assertThat; | ||
|
||
|
||
public class SeiImplementationMissingFailureAnalyzerTest { | ||
|
||
private SeiImplementationMissingFailureAnalyzer analyzer = new SeiImplementationMissingFailureAnalyzer(); | ||
|
||
@Test | ||
public void doesAnalysisContainCorrectDescription() throws Exception { | ||
|
||
Class serviceEndpointInterface = WebServiceAutoDetector.searchServiceEndpointInterface(); | ||
|
||
SeiImplementingClassNotFoundException seiNotFoundException = new SeiImplementingClassNotFoundException("No SEI implementing class found"); | ||
seiNotFoundException.setNotFoundClassName(serviceEndpointInterface.getName()); | ||
|
||
FailureAnalysis failureAnalysis = analyzer.analyze(seiNotFoundException); | ||
|
||
assertThat(failureAnalysis.getDescription(), containsString("There was no SEI implementing class found")); | ||
} | ||
|
||
|
||
|
||
} |