本文整理汇总了Java中org.assertj.core.api.JUnitSoftAssertions类的典型用法代码示例。如果您正苦于以下问题:Java JUnitSoftAssertions类的具体用法?Java JUnitSoftAssertions怎么用?Java JUnitSoftAssertions使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JUnitSoftAssertions类属于org.assertj.core.api包,在下文中一共展示了JUnitSoftAssertions类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: renderIntermediateClassBuilder
import org.assertj.core.api.JUnitSoftAssertions; //导入依赖的package包/类
static void renderIntermediateClassBuilder(JUnitSoftAssertions softly, String intermediateClassBuilderSource)
throws Exception {
BuilderTester<IntermediateClass> tester = new BuilderTester<IntermediateClass>(IntermediateClass.class,
intermediateClassBuilderSource);
IntermediateClass constructed = tester.test(".name(\"name2\")");
softly.assertThat(constructed.getName()).as("name").isEqualTo("name2");
}
示例2: renderNormalJavaBeanBuilder
import org.assertj.core.api.JUnitSoftAssertions; //导入依赖的package包/类
static void renderNormalJavaBeanBuilder(JUnitSoftAssertions softly, String normalJavaBeanBuilderSource)
throws Exception {
BuilderTester<NormalJavaBean> tester = new BuilderTester<NormalJavaBean>(NormalJavaBean.class,
normalJavaBeanBuilderSource);
NormalJavaBean constructed = tester
.test(".name($S).age(18).date(new java.util.Date()).address(new Address())", "builderTest");
softly.assertThat(constructed.getName()).isEqualTo("builderTest");
softly.assertThat(constructed.getAge()).isEqualTo(18);
}
示例3: assertGivenStackValues
import org.assertj.core.api.JUnitSoftAssertions; //导入依赖的package包/类
static void assertGivenStackValues(Object[][] values, final JUnitSoftAssertions softly, final StackFrame frame){
for (Object[] stackValues : values) {
int position = (int)stackValues[0];
int value = (int)stackValues[1];
assertThatValueAtPositionIsEqual(position, value, softly, frame);
}
}
示例4: assertGivenStackValuesWithAttributes
import org.assertj.core.api.JUnitSoftAssertions; //导入依赖的package包/类
static void assertGivenStackValuesWithAttributes(Object[][] values, final JUnitSoftAssertions softly, final StackFrame frame){
for (Object[] stackValues : values) {
int position = (int)stackValues[0];
int value = (int)stackValues[1];
String attribute = (String)stackValues[2];
assertThatValueAtPositionHave(position, value, attribute, softly, frame);
}
}
示例5: SimpleDependencyCheck
import org.assertj.core.api.JUnitSoftAssertions; //导入依赖的package包/类
public SimpleDependencyCheck(JUnitSoftAssertions softly) {
this.softly = softly;
}
示例6: assertThatValueAtPositionHave
import org.assertj.core.api.JUnitSoftAssertions; //导入依赖的package包/类
static void assertThatValueAtPositionHave(int position, int value, String attribute, final JUnitSoftAssertions softly, final StackFrame frame){
assertThatValueAtPositionIsEqual(position, value, softly, frame);
softly.assertThat(frame.getOperandAttr(position)).isEqualTo(attribute); // same const pool string
}
示例7: assertThatValueAtPositionIsEqual
import org.assertj.core.api.JUnitSoftAssertions; //导入依赖的package包/类
static void assertThatValueAtPositionIsEqual(int position, int value, final JUnitSoftAssertions softly, final StackFrame frame){
softly.assertThat(frame.peek(position)).isEqualTo(value);
}