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

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

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

AbstractListAssert.containsNull介绍

暂无

代码示例

代码示例来源:origin: json-path/JsonPath

@Test
public void issue_22b() throws Exception {
  String json = "{\"a\":[{\"b\":1,\"c\":2},{\"b\":5,\"c\":2}]}";
  List<Object> res = JsonPath.using(Configuration.defaultConfiguration().setOptions(Option.DEFAULT_PATH_LEAF_TO_NULL)).parse(json).read("a[?(@.b==5)].d");
  assertThat(res).hasSize(1).containsNull();
}

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

@Test
public void testMapWrapperFromNull() {
  h.createUpdate("insert into someBean (wrapperLong) values (null)").execute();
  List<SomeBean> beans = dao.listBeans();
  assertThat(beans).extracting(SomeBean::getWrapperLong).hasSize(1).containsNull();
}

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

@Test
public void testMapWrappedCharFromEmpty() {
  h.createUpdate("insert into someBean (wrappedChar) values ('')").execute();
  List<SomeBean> beans = dao.listBeans();
  assertThat(beans).extracting(SomeBean::getWrappedChar).hasSize(1).containsNull();
}

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

@Test
public void testMapValueTypeFromNull() {
  h.createUpdate("insert into someBean (valueType) values (null)").execute();
  List<SomeBean> beans = dao.listBeans();
  assertThat(beans).extracting(SomeBean::getValueType).hasSize(1).containsNull();
}

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

@Test
public void testMapStringFromNull() {
  h.createUpdate("insert into someBean (string) values (null)").execute();
  List<SomeBean> beans = dao.listBeans();
  assertThat(beans).extracting(SomeBean::getString).hasSize(1).containsNull();
}

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

@Test
public void testMapUriFromNull() {
  h.createUpdate("insert into someBean (uri) values (null)").execute();
  List<SomeBean> list = dao.listBeans();
  assertThat(list).extracting(SomeBean::getUri).hasSize(1).containsNull();
}

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

@Test
public void testMapWrappedCharFromNull() {
  h.createUpdate("insert into someBean (wrappedChar) values (null)").execute();
  List<SomeBean> beans = dao.listBeans();
  assertThat(beans).extracting(SomeBean::getWrappedChar).hasSize(1).containsNull();
}

代码示例来源:origin: allure-framework/allure2

@Test
public void shouldBeAbleToSpecifyHistoryIdViaLabel() throws Exception {
  final Set<TestResult> results = process(
      "allure1/history-id-label.xml", generateTestSuiteXmlName()
  ).getResults();
  assertThat(results)
      .filteredOn("name", "test1")
      .extracting(TestResult::getHistoryId)
      .containsExactly("something");
  assertThat(results)
      .filteredOn("name", "test2")
      .extracting(TestResult::getHistoryId)
      .containsNull();
}

代码示例来源:origin: opencypher/cypher-for-gremlin

@Test
public void tailNull() {
  String cypher = "RETURN tail(null)";
  List<Map<String, Object>> results = submitAndGet(cypher);
  assertThat(results)
    .extracting("head")
    .containsNull();
}

代码示例来源:origin: TNG/junit-dataprovider

@Test
public void testGetDataProviderMethodShouldReturnSingletonListContainingNullForNotFoundUseDataProviderAnnotation() {
  // Given:
  doReturn(null).when(testMethod).getAnnotation(UseDataProvider.class);
  // When:
  List<FrameworkMethod> result = underTest.getDataProviderMethods(testMethod);
  // Then:
  assertThat(result).hasSize(1).containsNull();
  assertThat(underTest.dataProviderMethods).containsEntry(testMethod, result);
}

代码示例来源:origin: opencypher/cypher-for-gremlin

@Test
public void headNotExistingProperties() {
  String cypher = "MATCH (n:person {name: 'marko'}) RETURN head(n.notExisting) as head";
  List<Map<String, Object>> results = submitAndGet(cypher);
  assertThat(results)
    .extracting("head")
    .containsNull();
}

代码示例来源:origin: opencypher/cypher-for-gremlin

@Test
public void headNull() {
  String cypher = "RETURN head(null)";
  List<Map<String, Object>> results = submitAndGet(cypher);
  assertThat(results)
    .extracting("head")
    .containsNull();
}

代码示例来源:origin: opencypher/cypher-for-gremlin

@Test
public void tailNotExistingProperties() {
  String cypher = "MATCH (n:person {name: 'marko'}) RETURN tail(n.notExisting) as tail";
  List<Map<String, Object>> results = submitAndGet(cypher);
  assertThat(results)
    .extracting("tail")
    .containsNull();
}

代码示例来源:origin: opencypher/cypher-for-gremlin

@Test
public void lastNotExistingProperties() {
  String cypher = "MATCH (n:person {name: 'marko'}) RETURN last(n.notExisting) as last";
  List<Map<String, Object>> results = submitAndGet(cypher);
  assertThat(results)
    .extracting("last")
    .containsNull();
}

代码示例来源:origin: opencypher/cypher-for-gremlin

@Test
public void lastEmpty() {
  String cypher = "MATCH (n:notExising) WITH n AS n RETURN last(collect(n)) AS last";
  List<Map<String, Object>> results = submitAndGet(cypher);
  assertThat(results)
    .extracting("last")
    .containsNull();
}

代码示例来源:origin: opencypher/cypher-for-gremlin

@Test
public void nullVertices() throws Exception {
  List<Map<String, Object>> results = submitAndGet(
    "MATCH (p:person) " +
      "OPTIONAL MATCH (p)-[c:created]->(s:software) " +
      "RETURN s AS soft");
  assertThat(results)
    .extracting("soft")
    .containsNull();
}

代码示例来源:origin: opencypher/cypher-for-gremlin

@Test
public void removeVertexProperty() {
  submitAndGet("CREATE (n:A {propertyToDelete: 'prop'})");
  List<Map<String, Object>> update = submitAndGet("MATCH (n:A) SET n.property1 = null RETURN n.propertyToDelete");
  assertThat(update)
    .extracting("n.name")
    .hasSize(1)
    .containsNull();
}

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

@Test
public void testMapWrapperFromNull() {
  h.createUpdate("insert into someBean (wrapperLong) values (null)").execute();
  List<SomeBean> beans = dao.listBeans();
  assertThat(beans).extracting(SomeBean::getWrapperLong).hasSize(1).containsNull();
}

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

@Test
public void testMapStringFromNull() {
  h.createUpdate("insert into someBean (string) values (null)").execute();
  List<SomeBean> beans = dao.listBeans();
  assertThat(beans).extracting(SomeBean::getString).hasSize(1).containsNull();
}

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

@Test
public void testMapUriFromNull() {
  h.createUpdate("insert into someBean (uri) values (null)").execute();
  List<SomeBean> list = dao.listBeans();
  assertThat(list).extracting(SomeBean::getUri).hasSize(1).containsNull();
}

相关文章

微信公众号

最新文章

更多