We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fbdc8cd commit e7af895Copy full SHA for e7af895
src/test/java/org/broadinstitute/consent/http/service/DraftServiceTest.java
@@ -72,11 +72,17 @@ void beforeEach() {
72
}
73
74
@Test
75
- void testCreateDraft() throws SQLException {
+ void testInsertDraftThrows() throws SQLException {
76
doThrow(new BadRequestException("Bad Request")).when(draftServiceDAO).insertDraft(any());
77
assertThrows(BadRequestException.class, () -> draftService.insertDraft(null));
78
79
80
+ @Test
81
+ void testInsertDraft() throws SQLException {
82
+ doNothing().when(draftServiceDAO).insertDraft(draft);
83
+ assertDoesNotThrow(()->draftService.insertDraft(draft));
84
+ }
85
+
86
87
void testGetAuthorizedDraftNotFound() {
88
doThrow(new NotFoundException("Not Found")).when(draftServiceDAO)
0 commit comments