Skip to content

Commit

Permalink
Add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Rkareko committed Dec 13, 2021
1 parent 687b356 commit 1d70147
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/test/java/org/opensrp/service/SettingServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,9 @@ public void testFindSettingsByIdentifierCallsRepositoryMethod() {
settingService.findSettingsByIdentifier("identifier-1");
verify(settingRepository).findSettingsAndSettingsMetadataByIdentifier("identifier-1");
}

@Test(expected = IllegalArgumentException.class)
public void testSaveSettingsThrowsExceptionWhenJsonSettingConfigurationIsNull() {
settingService.saveSetting(null);
}
}

0 comments on commit 1d70147

Please sign in to comment.