org.sonar.db.webhook.WebhookDeliveryDao.selectLatestDeliveries()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(148)

本文整理了Java中org.sonar.db.webhook.WebhookDeliveryDao.selectLatestDeliveries()方法的一些代码示例,展示了WebhookDeliveryDao.selectLatestDeliveries()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebhookDeliveryDao.selectLatestDeliveries()方法的具体详情如下:
包路径:org.sonar.db.webhook.WebhookDeliveryDao
类名称:WebhookDeliveryDao
方法名:selectLatestDeliveries

WebhookDeliveryDao.selectLatestDeliveries介绍

暂无

代码示例

代码示例来源:origin: SonarSource/sonarqube

private Map<String, WebhookDeliveryLiteDto> loadLastDeliveriesOf(DbSession dbSession, List<WebhookDto> webhookDtos) {
 return dbClient.webhookDeliveryDao().selectLatestDeliveries(dbSession, webhookDtos);
}

代码示例来源:origin: SonarSource/sonarqube

@Test
public void selectLatestDelivery_of_a_webhook() {
 WebhookDto webhook1 = dbWebhooks.insert(newProjectWebhook("COMPONENT_1"));
 underTest.insert(dbSession, WebhookDeliveryTesting.newDto("WH1-DELIVERY-1-UUID", webhook1.getUuid(), "COMPONENT_1", "TASK_1").setCreatedAt(BEFORE));
 underTest.insert(dbSession, WebhookDeliveryTesting.newDto("WH1-DELIVERY-2-UUID", webhook1.getUuid(), "COMPONENT_1", "TASK_2").setCreatedAt(NOW));
 WebhookDto webhook2 = dbWebhooks.insert(newProjectWebhook("COMPONENT_1"));
 underTest.insert(dbSession, WebhookDeliveryTesting.newDto("WH2-DELIVERY-1-UUID", webhook2.getUuid(), "COMPONENT_1", "TASK_1").setCreatedAt(BEFORE));
 underTest.insert(dbSession, WebhookDeliveryTesting.newDto("WH2-DELIVERY-2-UUID", webhook2.getUuid(), "COMPONENT_1", "TASK_2").setCreatedAt(NOW));
 Map<String, WebhookDeliveryLiteDto> map = underTest.selectLatestDeliveries(dbSession, of(webhook1, webhook2));
 assertThat(map).containsKeys(webhook1.getUuid());
 assertThat(map.get(webhook1.getUuid())).extracting(WebhookDeliveryLiteDto::getUuid).contains("WH1-DELIVERY-2-UUID");
 assertThat(map).containsKeys(webhook2.getUuid());
 assertThat(map.get(webhook2.getUuid())).extracting(WebhookDeliveryLiteDto::getUuid).contains("WH2-DELIVERY-2-UUID");
}

代码示例来源:origin: org.sonarsource.sonarqube/sonar-server

private Map<String, WebhookDeliveryLiteDto> loadLastDeliveriesOf(DbSession dbSession, List<WebhookDto> webhookDtos) {
 return dbClient.webhookDeliveryDao().selectLatestDeliveries(dbSession, webhookDtos);
}

相关文章