use of com.synopsys.integration.alert.api.channel.convert.AbstractChannelMessageConverter in project hub-alert by blackducksoftware.
the class MessageBoardChannelTest method distributeMessagesTest.
@Test
public void distributeMessagesTest() throws AlertException {
MessageResult expectedResult = new MessageResult("Test result");
DistributionJobDetailsModel testDetails = new DistributionJobDetailsModel(null, null) {
};
AbstractChannelMessageConverter<DistributionJobDetailsModel, Object> converter = createConverter();
ChannelMessageSender<DistributionJobDetailsModel, Object, MessageResult> sender = (x, y) -> expectedResult;
MessageBoardChannel<DistributionJobDetailsModel, Object> messageBoardChannel = new MessageBoardChannel<>(converter, sender) {
};
MessageResult testResult = messageBoardChannel.distributeMessages(testDetails, ProviderMessageHolder.empty(), "jobName");
assertEquals(expectedResult, testResult);
}
Aggregations