@Test public void test_makeCopy(){ IfGreaterThan op1 = new IfGreaterThan(); AssertionsForClassTypes.assertThat(op1.arity()).isEqualTo(4); Primitive op2 = op1.makeCopy(); assertThat(op1).isEqualTo(op2); }
@Test public void test_makeCopy(){ IfLessThan op1 = new IfLessThan(); AssertionsForClassTypes.assertThat(op1.arity()).isEqualTo(4); Primitive op2 = op1.makeCopy(); assertThat(op1).isEqualTo(op2); }
@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\""); }
@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); }
@Test public void test_readOnly(){ for(int i=0; i < constantSet.size(); ++i){ AssertionsForClassTypes.assertThat(constantSet.get(i).isConstant()).isTrue(); } }
@Test public void test_readOnly(){ for(int i=0; i < constantSet.size(); ++i){ AssertionsForClassTypes.assertThat(constantSet.get(i).isReadOnly()).isTrue(); } }
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); }