Search in sources :

Example 1 with EvoUserTransaction

use of org.evosuite.runtime.javaee.javax.transaction.EvoUserTransaction in project evosuite by EvoSuite.

the class Injector method injectUserTransaction.

@Constraints(noNullInputs = true, notMutable = true, noDirectInsertion = true)
public static <T> void injectUserTransaction(@BoundInputVariable(initializer = true, atMostOnceWithSameParameters = true) T instance, Class<?> clazz) throws IllegalArgumentException {
    Inputs.checkNull(instance, clazz);
    String field = userTransactionCache.getFieldName(clazz);
    assert field != null;
    // TODO this will likely need to change in the future
    inject(instance, clazz, field, new EvoUserTransaction());
}
Also used : EvoUserTransaction(org.evosuite.runtime.javaee.javax.transaction.EvoUserTransaction) Constraints(org.evosuite.runtime.annotation.Constraints)

Aggregations

Constraints (org.evosuite.runtime.annotation.Constraints)1 EvoUserTransaction (org.evosuite.runtime.javaee.javax.transaction.EvoUserTransaction)1