simplified the assertion for multilang daemon unit tests
This commit is contained in:
parent
8827017b49
commit
14f93b1819
1 changed files with 7 additions and 8 deletions
|
|
@ -123,42 +123,42 @@ public class MultiLangDaemonConfigTest {
|
||||||
public void testConstructorUsingStreamName() throws IOException {
|
public void testConstructorUsingStreamName() throws IOException {
|
||||||
setup(TEST_STREAM_NAME, null, TEST_REGION);
|
setup(TEST_STREAM_NAME, null, TEST_REGION);
|
||||||
|
|
||||||
assertConfigurationsMatch(deamonConfig, TEST_STREAM_NAME, null);
|
assertConfigurationsMatch(TEST_STREAM_NAME, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testConstructorUsingStreamNameAndStreamArnIsEmpty() throws IOException {
|
public void testConstructorUsingStreamNameAndStreamArnIsEmpty() throws IOException {
|
||||||
setup(TEST_STREAM_NAME, "", TEST_REGION);
|
setup(TEST_STREAM_NAME, "", TEST_REGION);
|
||||||
|
|
||||||
assertConfigurationsMatch(deamonConfig, TEST_STREAM_NAME, "");
|
assertConfigurationsMatch(TEST_STREAM_NAME, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testConstructorUsingStreamNameAndStreamArnIsWhitespace() throws IOException {
|
public void testConstructorUsingStreamNameAndStreamArnIsWhitespace() throws IOException {
|
||||||
setup(TEST_STREAM_NAME, " ", TEST_REGION);
|
setup(TEST_STREAM_NAME, " ", TEST_REGION);
|
||||||
|
|
||||||
assertConfigurationsMatch(deamonConfig, TEST_STREAM_NAME, "");
|
assertConfigurationsMatch(TEST_STREAM_NAME, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testConstructorUsingStreamArn() throws IOException {
|
public void testConstructorUsingStreamArn() throws IOException {
|
||||||
setup(null, TEST_STREAM_ARN, TEST_REGION);
|
setup(null, TEST_STREAM_ARN, TEST_REGION);
|
||||||
|
|
||||||
assertConfigurationsMatch(deamonConfig, TEST_STREAM_NAME_IN_ARN, TEST_STREAM_ARN);
|
assertConfigurationsMatch(TEST_STREAM_NAME_IN_ARN, TEST_STREAM_ARN);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testConstructorUsingStreamNameAsEmptyAndStreamArn() throws IOException {
|
public void testConstructorUsingStreamNameAsEmptyAndStreamArn() throws IOException {
|
||||||
setup("", TEST_STREAM_ARN, TEST_REGION);
|
setup("", TEST_STREAM_ARN, TEST_REGION);
|
||||||
|
|
||||||
assertConfigurationsMatch(deamonConfig, TEST_STREAM_NAME_IN_ARN, TEST_STREAM_ARN);
|
assertConfigurationsMatch(TEST_STREAM_NAME_IN_ARN, TEST_STREAM_ARN);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testConstructorUsingStreamArnOverStreamName() throws IOException {
|
public void testConstructorUsingStreamArnOverStreamName() throws IOException {
|
||||||
setup(TEST_STREAM_NAME, TEST_STREAM_ARN, TEST_REGION);
|
setup(TEST_STREAM_NAME, TEST_STREAM_ARN, TEST_REGION);
|
||||||
|
|
||||||
assertConfigurationsMatch(deamonConfig, TEST_STREAM_NAME_IN_ARN, TEST_STREAM_ARN);
|
assertConfigurationsMatch(TEST_STREAM_NAME_IN_ARN, TEST_STREAM_ARN);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -166,8 +166,7 @@ public class MultiLangDaemonConfigTest {
|
||||||
* @param deamonConfig
|
* @param deamonConfig
|
||||||
* @param expectedStreamName
|
* @param expectedStreamName
|
||||||
*/
|
*/
|
||||||
private void assertConfigurationsMatch(MultiLangDaemonConfig deamonConfig,
|
private void assertConfigurationsMatch(String expectedStreamName,
|
||||||
String expectedStreamName,
|
|
||||||
String expectedStreamArn){
|
String expectedStreamArn){
|
||||||
assertNotNull(deamonConfig.getExecutorService());
|
assertNotNull(deamonConfig.getExecutorService());
|
||||||
assertNotNull(deamonConfig.getMultiLangDaemonConfiguration());
|
assertNotNull(deamonConfig.getMultiLangDaemonConfiguration());
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue