/** * Create a delegating {@link TransactionAttribute} for the supplied target * {@link TransactionAttribute} and {@link TestContext}, using the names of * the test class and test method to build the name of the transaction. * @param testContext the {@code TestContext} upon which to base the name * @param targetAttribute the {@code TransactionAttribute} to delegate to * @return the delegating {@code TransactionAttribute} */ public static TransactionAttribute createDelegatingTransactionAttribute( TestContext testContext, TransactionAttribute targetAttribute) { Assert.notNull(testContext, "TestContext must not be null"); Assert.notNull(targetAttribute, "Target TransactionAttribute must not be null"); return new TestContextTransactionAttribute(targetAttribute, testContext); }
/** * Create a delegating {@link TransactionAttribute} for the supplied target * {@link TransactionAttribute} and {@link TestContext}, using the names of * the test class and test method to build the name of the transaction. * @param testContext the {@code TestContext} upon which to base the name * @param targetAttribute the {@code TransactionAttribute} to delegate to * @return the delegating {@code TransactionAttribute} */ public static TransactionAttribute createDelegatingTransactionAttribute( TestContext testContext, TransactionAttribute targetAttribute) { Assert.notNull(testContext, "TestContext must not be null"); Assert.notNull(targetAttribute, "Target TransactionAttribute must not be null"); return new TestContextTransactionAttribute(targetAttribute, testContext); }
/** * Create a delegating {@link TransactionAttribute} for the supplied target * {@link TransactionAttribute} and {@link TestContext}, using the names of * the test class and test method to build the name of the transaction. * @param testContext the {@code TestContext} upon which to base the name * @param targetAttribute the {@code TransactionAttribute} to delegate to * @return the delegating {@code TransactionAttribute} */ public static TransactionAttribute createDelegatingTransactionAttribute( TestContext testContext, TransactionAttribute targetAttribute) { Assert.notNull(testContext, "TestContext must not be null"); Assert.notNull(targetAttribute, "Target TransactionAttribute must not be null"); return new TestContextTransactionAttribute(targetAttribute, testContext); }