本文整理了Java中org.assertj.core.api.AbstractBooleanAssert.isNull()
方法的一些代码示例,展示了AbstractBooleanAssert.isNull()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractBooleanAssert.isNull()
方法的具体详情如下:
包路径:org.assertj.core.api.AbstractBooleanAssert
类名称:AbstractBooleanAssert
方法名:isNull
暂无
代码示例来源:origin: SonarSource/sonarqube
@Test
public void toBoolean() {
assertThat(RubyUtils.toBoolean(null)).isNull();
assertThat(RubyUtils.toBoolean("")).isNull();
assertThat(RubyUtils.toBoolean(" ")).isNull();
assertThat(RubyUtils.toBoolean("true")).isTrue();
assertThat(RubyUtils.toBoolean(true)).isTrue();
assertThat(RubyUtils.toBoolean("false")).isFalse();
assertThat(RubyUtils.toBoolean(false)).isFalse();
}
代码示例来源:origin: springside/springside4
@Test
public void test() {
assertThat(BooleanUtil.toBoolean("True")).isTrue();
assertThat(BooleanUtil.toBoolean("tre")).isFalse();
assertThat(BooleanUtil.toBoolean(null)).isFalse();
assertThat(BooleanUtil.toBooleanObject("True")).isTrue();
assertThat(BooleanUtil.toBooleanObject("tre")).isFalse();
assertThat(BooleanUtil.toBooleanObject(null)).isNull();
assertThat(BooleanUtil.parseGeneralString("1", false)).isFalse();
assertThat(BooleanUtil.parseGeneralString("y", false)).isTrue();
assertThat(BooleanUtil.parseGeneralString("y")).isTrue();
assertThat(BooleanUtil.parseGeneralString("x")).isNull();
}
代码示例来源:origin: apache/geode
@Test
public void defaultRegionFunctionArgs() throws Exception {
assertThat(args.getDiskSynchronous()).isNull();
assertThat(args.getCloningEnabled()).isNull();
assertThat(args.getConcurrencyChecksEnabled()).isNull();
assertThat(args.getConcurrencyLevel()).isNull();
assertThat(args.getPartitionArgs()).isNull();
assertThat(args.hasPartitionAttributes()).isFalse();
assertThat(args.getEvictionAttributes()).isNull();
}
代码示例来源:origin: twosigma/beakerx
@Test
public void createTreeMapByDefaultConstructor_hasModeAndStickyAndRoundAndRatioAreNulls() {
//given
treeMap = createWidget();
//then
assertThat(treeMap.getMode()).isNull();
assertThat(treeMap.getRatio()).isNull();
assertThat(treeMap.getSticky()).isNull();
assertThat(treeMap.getRound()).isNull();
}
代码示例来源:origin: square/wire
assertThat(FooBar.FooBarBazEnum.FOO.foreign_enum_value_option).isNull();
assertThat(FooBar.FooBarBazEnum.BAR.enum_value_option).isNull();
assertThat(FooBar.FooBarBazEnum.BAR.foreign_enum_value_option).isTrue();
代码示例来源:origin: apache/geode
@Test
public void getRedirectOutputReturnsNullByDefault() {
assertThat(new Builder().getRedirectOutput()).isNull();
}
代码示例来源:origin: apache/geode
@Test
public void getRedirectOutputReturnsNullByDefault() throws Exception {
assertThat(new LocatorLauncher.Builder().getRedirectOutput()).isNull();
}
代码示例来源:origin: SonarSource/sonarqube
@Test
public void null_param() {
assertThat(underTest.param("a_string")).isNull();
assertThat(underTest.paramAsBoolean("a_boolean")).isNull();
assertThat(underTest.paramAsInt("a_number")).isNull();
assertThat(underTest.paramAsLong("a_number")).isNull();
}
代码示例来源:origin: springside/springside4
assertThat(result0).isNull();
assertThat(result1).isNull();
代码示例来源:origin: SonarSource/sonarqube
@Test
public void create_empty_query() {
RuleQuery result = execute();
assertThat(result.getKey()).isNull();
assertThat(result.getActivation()).isNull();
assertThat(result.getActiveSeverities()).isNull();
assertThat(result.isAscendingSort()).isTrue();
assertThat(result.getAvailableSinceLong()).isNull();
assertThat(result.getInheritance()).isNull();
assertThat(result.includeExternal()).isFalse();
assertThat(result.isTemplate()).isNull();
assertThat(result.getLanguages()).isNull();
assertThat(result.getQueryText()).isNull();
assertThat(result.getQProfile()).isNull();
assertThat(result.getRepositories()).isNull();
assertThat(result.getRuleKey()).isNull();
assertThat(result.getSeverities()).isNull();
assertThat(result.getStatuses()).isEmpty();
assertThat(result.getTags()).isNull();
assertThat(result.templateKey()).isNull();
assertThat(result.getTypes()).isEmpty();
assertThat(result.getSortField()).isNull();
assertThat(result.getCompareToQProfile()).isNull();
}
代码示例来源:origin: SonarSource/sonarqube
@Test
public void test_default_query() {
IssueQuery query = IssueQuery.builder().build();
assertThat(query.issueKeys()).isEmpty();
assertThat(query.projectUuids()).isEmpty();
assertThat(query.componentUuids()).isEmpty();
assertThat(query.moduleUuids()).isEmpty();
assertThat(query.statuses()).isEmpty();
assertThat(query.assignees()).isEmpty();
assertThat(query.resolutions()).isEmpty();
assertThat(query.rules()).isEmpty();
assertThat(query.severities()).isEmpty();
assertThat(query.languages()).isEmpty();
assertThat(query.tags()).isEmpty();
assertThat(query.types()).isEmpty();
assertThat(query.organizationUuid()).isNull();
assertThat(query.branchUuid()).isNull();
assertThat(query.assigned()).isNull();
assertThat(query.createdAfter()).isNull();
assertThat(query.createdBefore()).isNull();
assertThat(query.resolved()).isNull();
assertThat(query.sort()).isNull();
assertThat(query.createdAfterByProjectUuids()).isEmpty();
}
代码示例来源:origin: SonarSource/sonarqube
@Test
public void activation_is_set_to_null_when_not_member_of_paid_organization() {
OrganizationDto organization = db.organizations().insert(o -> o.setSubscription(PAID));
QProfileDto profile = db.qualityProfiles().insert(organization, p -> p.setName("Sonar way").setLanguage("xoo").setKee("sonar-way"));
RuleQuery result = execute(
PARAM_ACTIVATION, "true",
PARAM_QPROFILE, profile.getKee());
assertThat(result.getActivation()).isNull();
}
代码示例来源:origin: lingochamp/okdownload
assertThat(task.getSetPreAllocateLength()).isNull();
task = new DownloadTask
.Builder("https://jacksgong.com", "not-exist", null)
代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core
private RegularStatement statementWithIdempotency(Boolean idempotency) {
RegularStatement statement = new SimpleStatement("fake statement");
if (idempotency != null) {
statement.setIdempotent(idempotency);
assertThat(statement.isIdempotent()).isEqualTo(idempotency);
} else {
assertThat(statement.isIdempotent()).isNull();
}
return statement;
}
}
代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core
@Test(groups = "unit")
public void isIdempotent_should_return_override_flag_if_calculated_idempotency_null() {
TestBatch batch = createBatch();
assertThat(batch.isIdempotent()).isTrue();
batch.add(statementWithIdempotency(null));
assertThat(batch.isIdempotent()).isNull();
batch.setIdempotent(false);
assertThat(batch.isIdempotent()).isFalse();
}
代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core
@Test(groups = "unit")
public void
isIdempotent_should_return_null_if_no_nonidempotent_statements_and_some_are_nullidempotent() {
TestBatch batch = createBatch();
assertThat(batch.isIdempotent()).isTrue();
batch.add(statementWithIdempotency(true));
assertThat(batch.isIdempotent()).isTrue();
batch.add(statementWithIdempotency(null));
assertThat(batch.isIdempotent()).isNull();
batch.add(statementWithIdempotency(true));
assertThat(batch.isIdempotent()).isNull();
}
代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core
bound = prepared.bind(1);
assertThat(prepared.isIdempotent()).isNull();
assertThat(bound.isIdempotent()).isNull();
代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core
@Test(groups = "unit")
public void
isIdempotent_should_return_false_if_both_nonidempotent_and_nullidempotent_statements_present() {
TestBatch batch = createBatch();
assertThat(batch.isIdempotent()).isTrue();
batch.add(statementWithIdempotency(true));
assertThat(batch.isIdempotent()).isTrue();
batch.add(statementWithIdempotency(null));
assertThat(batch.isIdempotent()).isNull();
batch.add(statementWithIdempotency(false));
assertThat(batch.isIdempotent()).isFalse();
batch.add(statementWithIdempotency(true));
assertThat(batch.isIdempotent()).isFalse();
batch.add(statementWithIdempotency(null));
assertThat(batch.isIdempotent()).isFalse();
batch.add(statementWithIdempotency(false));
assertThat(batch.isIdempotent()).isFalse();
}
代码示例来源:origin: com.datastax.dse/dse-java-driver-core
private RegularStatement statementWithIdempotency(Boolean idempotency) {
RegularStatement statement = new SimpleStatement("fake statement");
if (idempotency != null) {
statement.setIdempotent(idempotency);
assertThat(statement.isIdempotent()).isEqualTo(idempotency);
} else {
assertThat(statement.isIdempotent()).isNull();
}
return statement;
}
}
代码示例来源:origin: com.datastax.dse/dse-java-driver-core
@Test(groups = "unit")
public void isIdempotent_should_return_override_flag_if_calculated_idempotency_null() {
TestBatch batch = createBatch();
assertThat(batch.isIdempotent()).isTrue();
batch.add(statementWithIdempotency(null));
assertThat(batch.isIdempotent()).isNull();
batch.setIdempotent(false);
assertThat(batch.isIdempotent()).isFalse();
}
内容来源于网络,如有侵权,请联系作者删除!