use of com.navercorp.pinpoint.web.dao.WebhookDao in project pinpoint by naver.
the class WebhookSendInfoServiceImplTest method selectWebhookSendInfoByServiceNameTest.
@Test
public void selectWebhookSendInfoByServiceNameTest() {
WebhookDao webhookDao = mock(WebhookDao.class);
WebhookSendInfoDao webhookSendInfoDao = new MemoryWebhookSendInfoDao(webhookDao);
when(webhookDao.selectWebhookByServiceName("testGroup")).thenReturn(webhookList);
WebhookSendInfoService webhookSendInfoService = new WebhookSendInfoServiceImpl(webhookSendInfoDao);
for (WebhookSendInfo webhookSendInfo : webhookSendInfoList) {
webhookSendInfoService.insertWebhookSendInfo(webhookSendInfo);
}
List<WebhookSendInfo> selectedWebhookSendInfos = webhookSendInfoService.selectWebhookSendInfoByServiceName("testGroup");
assertEquals(1, selectedWebhookSendInfos.size());
}
Aggregations