Skip to content

Commit 8119e86

Browse files
committed
#102 : Increase test coverage as per Sonar report
1 parent 481e81e commit 8119e86

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

bxbot-core/src/test/java/com/gazbert/bxbot/core/config/exchange/TestAuthenticationConfigImpl.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,11 @@ public void testAddingAndFetchingAuthenticationConfig() {
5252
assertEquals(
5353
SECRET_FEE_CONFIG_ITEM_VALUE, authenticationConfig.getItems().get(SECRET_CONFIG_ITEM_KEY));
5454
}
55+
56+
@Test
57+
public void testFetchingSingleAuthenticationConfigItem() {
58+
final AuthenticationConfigImpl authenticationConfig = new AuthenticationConfigImpl();
59+
authenticationConfig.getItems().put(API_KEY_CONFIG_ITEM_KEY, API_KEY_CONFIG_ITEM_VALUE);
60+
assertEquals(API_KEY_CONFIG_ITEM_VALUE, authenticationConfig.getItem(API_KEY_CONFIG_ITEM_KEY));
61+
}
5562
}

bxbot-strategy-api/src/test/java/com/gazbert/bxbot/strategy/api/TestStrategyExceptionCreation.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,11 @@ public void testCreationOfExceptionWithCauseIsAsExpected() {
5050
assertEquals(ERROR_MSG, exception.getMessage());
5151
assertEquals(CAUSE, exception.getCause());
5252
}
53+
54+
@Test
55+
public void testCreationOfExceptionWithThrowableIsAsExpected() {
56+
final StrategyException exception = new StrategyException(CAUSE);
57+
assertEquals(CAUSE, exception.getCause());
58+
}
59+
5360
}

0 commit comments

Comments
 (0)