-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #516 from CMSgov/story-503
Story 503
- Loading branch information
Showing
10 changed files
with
280 additions
and
29 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
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
15 changes: 15 additions & 0 deletions
15
rest-api/src/main/java/gov/cms/qpp/conversion/api/exceptions/InvalidFileTypeException.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,15 @@ | ||
package gov.cms.qpp.conversion.api.exceptions; | ||
|
||
/** | ||
* Exception for handling an invalid file type | ||
*/ | ||
public class InvalidFileTypeException extends RuntimeException { | ||
|
||
/** | ||
* Constructor to call RuntimeException | ||
* @param message Error response | ||
*/ | ||
public InvalidFileTypeException(String message) { | ||
super(message); | ||
} | ||
} |
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
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
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
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
16 changes: 16 additions & 0 deletions
16
...api/src/test/java/gov/cms/qpp/conversion/api/exceptions/InvalidFileTypeExceptionTest.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,16 @@ | ||
package gov.cms.qpp.conversion.api.exceptions; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static com.google.common.truth.Truth.assertThat; | ||
|
||
class InvalidFileTypeExceptionTest { | ||
|
||
@Test | ||
void testConstructor() { | ||
InvalidFileTypeException invalidFileTypeException = new InvalidFileTypeException("test"); | ||
|
||
|
||
assertThat(invalidFileTypeException).hasMessageThat().isEqualTo("test"); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
rest-api/src/test/java/gov/cms/qpp/conversion/api/exceptions/NoFileInDatabaseException.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,16 @@ | ||
package gov.cms.qpp.conversion.api.exceptions; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static com.google.common.truth.Truth.assertThat; | ||
|
||
class NoFileInDatabaseExceptionTest { | ||
|
||
@Test | ||
void testConstructor() { | ||
NoFileInDatabaseException noFileInDatabaseException = new NoFileInDatabaseException("test"); | ||
|
||
|
||
assertThat(noFileInDatabaseException).hasMessageThat().isEqualTo("test"); | ||
} | ||
} |
Oops, something went wrong.