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

项目:java-genetic-programming    文件:IfGreaterThanUnitTest.java   
@Test
public void test_makeCopy(){
   IfGreaterThan op1 = new IfGreaterThan();
   AssertionsForClassTypes.assertThat(op1.arity()).isEqualTo(4);
   Primitive op2 = op1.makeCopy();
   assertThat(op1).isEqualTo(op2);
}
项目:java-genetic-programming    文件:IfLessThanUnitTest.java   
@Test
public void test_makeCopy(){
   IfLessThan op1 = new IfLessThan();
   AssertionsForClassTypes.assertThat(op1.arity()).isEqualTo(4);
   Primitive op2 = op1.makeCopy();
   assertThat(op1).isEqualTo(op2);
}
项目:logcapture    文件:LogCaptureShould.java   
@Test
public void throws_exception_when_fail_to_verify_captured_events_with_exception_message_not_match() {
  AssertionsForClassTypes.assertThatThrownBy(() ->
    LogbackInterceptor.captureLogEvents(() -> log.info("message", new RuntimeException(
      new IllegalStateException("Some state is invalid"))))
      .logged(aLog()
        .havingException(logException()
          .withException(whereCauseMessage(equalTo("another cause message")))
        ))
  ).hasMessageContaining("Expecting exception cause to contain \"another cause message\"");
}
项目:Architecting-Modern-Java-EE-Applications    文件:CarManufacturerTest.java   
@Test
public void test() {
    Specification spec = new Specification();
    Car expected = new Car(spec);
    AssertionsForClassTypes.assertThat(carManufacture.manufactureCar(spec)).isEqualTo(expected);

    carManufacture.verifyManufacture(expected);
    carFactory.verifyCarCreation(spec);
}
项目:java-genetic-programming    文件:ConstantSetUnitTest.java   
@Test
public void test_readOnly(){
   for(int i=0; i < constantSet.size(); ++i){
      AssertionsForClassTypes.assertThat(constantSet.get(i).isConstant()).isTrue();
   }
}
项目:java-genetic-programming    文件:ConstantSetUnitTest.java   
@Test
public void test_readOnly(){
   for(int i=0; i < constantSet.size(); ++i){
      AssertionsForClassTypes.assertThat(constantSet.get(i).isReadOnly()).isTrue();
   }
}
项目:lettuce-core    文件:RedisClusterClientTest.java   
private void assertTimeout(StatefulConnection<?, ?> connection, long expectedTimeout, TimeUnit expectedTimeUnit) {

        AssertionsForClassTypes.assertThat(ReflectionTestUtils.getField(connection, "timeout")).isEqualTo(expectedTimeout);
        AssertionsForClassTypes.assertThat(ReflectionTestUtils.getField(connection, "unit")).isEqualTo(expectedTimeUnit);
    }