-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
50b16b2
commit a0f1d4e
Showing
2 changed files
with
26 additions
and
9 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: 18 additions & 1 deletion
19
ab2d-events-client/src/test/java/gov/cms/ab2d/eventclient/events/ErrorEventTest.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 |
---|---|---|
@@ -1,12 +1,29 @@ | ||
package gov.cms.ab2d.eventclient.events; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class ErrorEventTest { | ||
|
||
ErrorEvent errorEvent; | ||
|
||
@Test | ||
void test() { | ||
void testConstructor() { | ||
assertDoesNotThrow(() -> { | ||
new ErrorEvent(null, null, null, null); | ||
new ErrorEvent("CMS", "1234", ErrorEvent.ErrorType.FILE_ALREADY_DELETED, "ERROR"); | ||
}); | ||
} | ||
|
||
@Test | ||
void testAsMessage() { | ||
errorEvent = new ErrorEvent(); | ||
errorEvent.setJobId("1234"); | ||
errorEvent.setErrorType(ErrorEvent.ErrorType.FILE_ALREADY_DELETED); | ||
errorEvent.setDescription("ERROR"); | ||
assertEquals("(1234): FILE_ALREADY_DELETED ERROR", errorEvent.asMessage()); | ||
} | ||
|
||
} |