...
Code Block |
---|
|
@Component
@RequiredArgsConstructor
public class Example {
private ClRuntimeParameterGroup parameters;
....
public void method() {
.....
long heartBeatMs = parameters.getHeartBeatMs();
.....
} |
The below code shows an example of validation of the POJO ClRuntimeParameterGroup which contains the values mapped from properties file.
Code Block |
---|
|
private ValidatorFactory validatorFactory = Validation.buildDefaultValidatorFactory();
@Test
void testParameters_NullTopicParameterGroup() {
final ClRuntimeParameterGroup parameters = CommonTestData.geParameterGroup();
parameters.setTopicParameterGroup(null);
assertThat(validatorFactory.getValidator().validate(parameters)).isNotEmpty();
}
|
Note |
---|
This page is Work in Progress |
...