org.assertj.core.api.AbstractListAssert.doesNotContainNull()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(110)

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

AbstractListAssert.doesNotContainNull介绍

暂无

代码示例

代码示例来源:origin: jdbi/jdbi

@Test
public void testBatchInsertWithKeyGenerationAndExplicitSeveralColumnNames() {
  PreparedBatch batch = h.prepareBatch("insert into something (name) values (?) ");
  batch.add("Brian");
  batch.add("Thom");
  List<IdCreateTime> ids = batch.executeAndReturnGeneratedKeys("id", "create_time")
      .map((r, ctx) -> new IdCreateTime(r.getInt("id"), r.getDate("create_time")))
      .list();
  assertThat(ids).hasSize(2);
  assertThat(ids).extracting(ic -> ic.id).containsExactly(1, 2);
  assertThat(ids).extracting(ic -> ic.createTime).doesNotContainNull();
}

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

@Test
@UseDataProvider("numberOfGlobalWebhooksToMigration")
public void execute_migrates_any_number_of_global_webhook_to_default_organization(int numberOfGlobalWebhooks) throws SQLException {
 String defaultOrganizationUuid = insertDefaultOrganization();
 insertGlobalWebhookProperties(numberOfGlobalWebhooks);
 Row[] webhooks = IntStream.range(1, numberOfGlobalWebhooks + 1)
  .mapToObj(i -> insertGlobalWebhookProperty(i, "name webhook " + i, "url webhook " + i, defaultOrganizationUuid))
  .map(Row::new)
  .toArray(Row[]::new);
 underTest.execute();
 assertThat(selectWebhooksInDb())
  .containsOnly(webhooks)
  .extracting(Row::getUuid)
  .doesNotContainNull();
 assertNoMoreWebhookProperties();
}

代码示例来源:origin: jdbi/jdbi

@Test
public void testUseRowMapperBatch() {
  dbRule.getJdbi().useExtension(UseRowMapperDao.class, dao -> {
    dao.createTable();
    List<IdCreateTime> results = dao.insertBatch("foo", "bar");
    assertThat(results).extracting(ic -> ic.id).containsExactly(1L, 2L);
    assertThat(results).extracting(ic -> ic.createdOn).hasSize(2).doesNotContainNull();
  });
}

代码示例来源:origin: jdbi/jdbi

@Test
public void testRegisterRowMapperBatch() {
  dbRule.getJdbi().useExtension(RegisterRowMapperDao.class, dao -> {
    dao.createTable();
    List<IdCreateTime> results = dao.insertBatch("foo", "bar");
    assertThat(results).extracting(ic -> ic.id).containsExactly(1L, 2L);
    assertThat(results).extracting(ic -> ic.createdOn).hasSize(2).doesNotContainNull();
  });
}

代码示例来源:origin: com.hubspot.jinjava/jinjava

@Test
public void itDoesntReturnTrailingNull() {
 assertThat(new HelperStringTokenizer("product in collections.frontpage.products   ").splitComma(true).allTokens())
   .containsExactly("product", "in", "collections.frontpage.products")
   .doesNotContainNull();
}

代码示例来源:origin: HubSpot/jinjava

@Test
public void itDoesntReturnTrailingNull() {
 assertThat(new HelperStringTokenizer("product in collections.frontpage.products   ").splitComma(true).allTokens())
   .containsExactly("product", "in", "collections.frontpage.products")
   .doesNotContainNull();
}

代码示例来源:origin: t28hub/json2java4idea

@Test
  public void stream() throws Exception {
    // exercise
    final Stream<Map.Entry<String, JsonValue>> actual = underTest.stream();

    // verify
    assertThat(actual)
        .hasSize(2)
        .doesNotContainNull();
  }
}

代码示例来源:origin: t28hub/json2java4idea

@Test
  public void stream() throws Exception {
    // exercise
    final Stream<JsonValue> actual = underTest.stream();

    // verify
    assertThat(actual)
        .hasSize(4)
        .doesNotContainNull();
  }
}

代码示例来源:origin: org.jdbi/jdbi3-sqlobject

@Test
public void testUseRowMapperBatch() {
  dbRule.getJdbi().useExtension(UseRowMapperDao.class, dao -> {
    dao.createTable();
    List<IdCreateTime> results = dao.insertBatch("foo", "bar");
    assertThat(results).extracting(ic -> ic.id).containsExactly(1L, 2L);
    assertThat(results).extracting(ic -> ic.createdOn).hasSize(2).doesNotContainNull();
  });
}

代码示例来源:origin: org.jdbi/jdbi3-sqlobject

@Test
public void testRegisterRowMapperBatch() {
  dbRule.getJdbi().useExtension(RegisterRowMapperDao.class, dao -> {
    dao.createTable();
    List<IdCreateTime> results = dao.insertBatch("foo", "bar");
    assertThat(results).extracting(ic -> ic.id).containsExactly(1L, 2L);
    assertThat(results).extracting(ic -> ic.createdOn).hasSize(2).doesNotContainNull();
  });
}

相关文章

微信公众号

最新文章

更多