Java 类org.assertj.core.api.JUnitSoftAssertions 实例源码

项目:builderator    文件:BuilderatorTest.java   
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");
}
项目:builderator    文件:BuilderatorTest.java   
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);
}
项目:gjpf-core    文件:StackFrameTest.java   
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);
  }
}
项目:gjpf-core    文件:StackFrameTest.java   
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);
  }
}
项目:xtf    文件:SimpleDependencyCheck.java   
public SimpleDependencyCheck(JUnitSoftAssertions softly) {
    this.softly = softly;
}
项目:gjpf-core    文件:StackFrameTest.java   
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
}
项目:gjpf-core    文件:StackFrameTest.java   
static void assertThatValueAtPositionIsEqual(int position, int value, final JUnitSoftAssertions softly, final StackFrame frame){
  softly.assertThat(frame.peek(position)).isEqualTo(value);
}