我有一个测试在它应该失败的时候不会失败:
import static org.assertj.core.api.Assertions.assertThat;
@Test
public void testTransactionResponse() {
String id= "004";
long amount= 5000001L;
TransactionResource transactionResource = buildTransactionResource(amount, "EUR");
System.out.println(transactionController.create(id, transactionResource).getStatusCode()); //the output is 403
assertThat(transactionController.create(id, transactionResource).getStatusCode().equals(200)); //is true and test doesn't fail
}
这怎么可能?