本文整理了Java中org.assertj.core.api.AbstractBooleanAssert.isNotEqualTo()
方法的一些代码示例,展示了AbstractBooleanAssert.isNotEqualTo()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractBooleanAssert.isNotEqualTo()
方法的具体详情如下:
包路径:org.assertj.core.api.AbstractBooleanAssert
类名称:AbstractBooleanAssert
方法名:isNotEqualTo
[英]Verifies that the actual value is not equal to the given one.
Example:
// assertions will pass
assertThat(true).isNotEqualTo(false);
assertThat(Boolean.FALSE).isNotEqualTo(true);
// assertions will fail
assertThat(true).isNotEqualTo(true);
assertThat(Boolean.FALSE).isNotEqualTo(false);
[中]验证实际值是否不等于给定值。
例子:
// assertions will pass
assertThat(true).isNotEqualTo(false);
assertThat(Boolean.FALSE).isNotEqualTo(true);
// assertions will fail
assertThat(true).isNotEqualTo(true);
assertThat(Boolean.FALSE).isNotEqualTo(false);
代码示例来源:origin: facebook/litho
assertThat(newIsEnabled).isNotEqualTo(oldIsEnabled);
代码示例来源:origin: sta-szek/pojo-tester
private Executable Should_Change_Wrapped_Value(final Boolean value) {
return () -> {
// given
final AllFiledTypes_Wrapped helpClass1 = new AllFiledTypes_Wrapped(value);
final AllFiledTypes_Wrapped helpClass2 = new AllFiledTypes_Wrapped(value);
// when
valueChanger.changeFieldsValues(helpClass1,
helpClass2,
Lists.newArrayList(AllFiledTypes_Wrapped.class.getDeclaredFields()));
final Boolean result1 = getInternalState(helpClass1, "booleanType");
final Boolean result2 = getInternalState(helpClass2, "booleanType");
// then
assertThat(result1).isNotEqualTo(result2);
};
}
代码示例来源:origin: sta-szek/pojo-tester
private Executable Should_Change_Primitive_Value(final Boolean value) {
return () -> {
// given
final AllFiledTypes helpClass1 = new AllFiledTypes(value);
final AllFiledTypes helpClass2 = new AllFiledTypes(value);
// when
valueChanger.changeFieldsValues(helpClass1,
helpClass2,
Lists.newArrayList(AllFiledTypes.class.getDeclaredFields()));
final Boolean result1 = getInternalState(helpClass1, "booleanType");
final Boolean result2 = getInternalState(helpClass2, "booleanType");
// then
assertThat(result1).isNotEqualTo(result2);
};
}
代码示例来源:origin: commercetools/commercetools-jvm-sdk
@Test
public void changeIsActive() throws Exception {
withPersistentCartDiscount(client(), cartDiscount -> {
final boolean newIsActice = !cartDiscount.isActive();
assertThat(cartDiscount.isActive()).isNotEqualTo(newIsActice);
final CartDiscount updatedDiscount =
client().executeBlocking(CartDiscountUpdateCommand.of(cartDiscount, ChangeIsActive.of(newIsActice)));
assertThat(updatedDiscount.isActive()).isEqualTo(newIsActice);
});
}
代码示例来源:origin: commercetools/commercetools-jvm-sdk
@Test
public void changeRequiresDiscountCode() throws Exception {
withCartDiscount(
client(),
cartDiscountDraftBuilder -> cartDiscountDraftBuilder.requiresDiscountCode(true),
cartDiscount -> {
final boolean newRequiresDiscountCode = !cartDiscount.isRequiringDiscountCode();
assertThat(cartDiscount.isRequiringDiscountCode()).isNotEqualTo(newRequiresDiscountCode);
final CartDiscount updatedDiscount =
client().executeBlocking(CartDiscountUpdateCommand.of(cartDiscount, ChangeRequiresDiscountCode.of(newRequiresDiscountCode)));
assertThat(updatedDiscount.isRequiringDiscountCode()).isEqualTo(newRequiresDiscountCode);
return updatedDiscount;
});
}
内容来源于网络,如有侵权,请联系作者删除!