Search in sources :

Example 1 with DistributionConfigurationValidator

use of com.synopsys.integration.alert.common.descriptor.validator.DistributionConfigurationValidator in project hub-alert by blackducksoftware.

the class ChannelDescriptorTest method getterTest.

@Test
public void getterTest() {
    String name = "channel";
    ChannelKey channelKey = new ChannelKey(name, name) {
    };
    ChannelDescriptor channelDescriptor = new ChannelDescriptor(channelKey, Set.of(ConfigContextEnum.DISTRIBUTION)) {

        @Override
        public Optional<GlobalConfigurationFieldModelValidator> getGlobalValidator() {
            return Optional.empty();
        }

        @Override
        public Optional<DistributionConfigurationValidator> getDistributionValidator() {
            return Optional.empty();
        }
    };
    assertEquals(name, channelDescriptor.getDescriptorKey().getUniversalKey());
}
Also used : ChannelKey(com.synopsys.integration.alert.descriptor.api.model.ChannelKey) DistributionConfigurationValidator(com.synopsys.integration.alert.common.descriptor.validator.DistributionConfigurationValidator) GlobalConfigurationFieldModelValidator(com.synopsys.integration.alert.common.descriptor.validator.GlobalConfigurationFieldModelValidator) Test(org.junit.jupiter.api.Test)

Aggregations

DistributionConfigurationValidator (com.synopsys.integration.alert.common.descriptor.validator.DistributionConfigurationValidator)1 GlobalConfigurationFieldModelValidator (com.synopsys.integration.alert.common.descriptor.validator.GlobalConfigurationFieldModelValidator)1 ChannelKey (com.synopsys.integration.alert.descriptor.api.model.ChannelKey)1 Test (org.junit.jupiter.api.Test)1