Search in sources :

Example 1 with EvoEvent

use of org.evosuite.runtime.javaee.javax.enterprise.event.EvoEvent in project evosuite by EvoSuite.

the class Injector method injectEvent.

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

Aggregations

Constraints (org.evosuite.runtime.annotation.Constraints)1 EvoEvent (org.evosuite.runtime.javaee.javax.enterprise.event.EvoEvent)1