@Test @DisplayName("fail to subscribe to the same event filtering by different fields") void failToSubscribeByDifferentFields() { assertThrows( HandlerFieldFilterClashError.class, () -> asProjectionClass(DifferentFieldSubscription.class) ); }
public static <P extends Projection> ProjectionClass<P> asProjectionClass(Class<P> cls) { checkNotNull(cls); ProjectionClass<P> result = (ProjectionClass<P>) get(cls, ProjectionClass.class, () -> new ProjectionClass<>(cls)); return result; }
ProjectionClass extends EntityClass<P> implements EventReceiverClass, SubscribingClass, StateSubscribingClass { public static <P extends Projection> ProjectionClass<P> asProjectionClass(Class<P> cls) { checkNotNull(cls); ProjectionClass<P> result = (ProjectionClass<P>) get(cls, ProjectionClass.class, () -> new ProjectionClass<>(cls)); return result; } }
ProjectionClass extends EntityClass<P> implements EventReceiverClass, SubscribingClass, StateSubscribingClass { public static <P extends Projection> ProjectionClass<P> asProjectionClass(Class<P> cls) { checkNotNull(cls); ProjectionClass<P> result = (ProjectionClass<P>) get(cls, ProjectionClass.class, () -> new ProjectionClass<>(cls)); return result; } private  ProjectionClass(Class<P> cls); }
ProjectionClass extends EntityClass<P> implements EventReceiverClass, SubscribingClass, StateSubscribingClass { public static <P extends Projection> ProjectionClass<P> asProjectionClass(Class<P> cls) { checkNotNull(cls); ProjectionClass<P> result = (ProjectionClass<P>) get(cls, ProjectionClass.class, () -> new ProjectionClass<>(cls)); return result; } private  ProjectionClass(Class<P> cls); static ProjectionClass<P> asProjectionClass(Class<P> cls); @Override final ImmutableSet<EventClass> events(); @Override final ImmutableSet<EventClass> domesticEvents(); @Override final ImmutableSet<EventClass> externalEvents(); @Override final ImmutableSet<StateClass> domesticStates(); @Override final ImmutableSet<StateClass> externalStates(); @Override final ImmutableSet<SubscriberMethod> subscribersOf(EventClass eventClass, MessageClass originClass); }
ProjectionClass extends EntityClass<P> implements EventReceiverClass, SubscribingClass, StateSubscribingClass { public static <P extends Projection> ProjectionClass<P> asProjectionClass(Class<P> cls) { checkNotNull(cls); ProjectionClass<P> result = (ProjectionClass<P>) get(cls, ProjectionClass.class, () -> new ProjectionClass<>(cls)); return result; } private  ProjectionClass(Class<P> cls); static ProjectionClass<P> asProjectionClass(Class<P> cls); @Override final ImmutableSet<EventClass> events(); @Override final ImmutableSet<EventClass> domesticEvents(); @Override final ImmutableSet<EventClass> externalEvents(); @Override final ImmutableSet<StateClass> domesticStates(); @Override final ImmutableSet<StateClass> externalStates(); @Override final ImmutableSet<SubscriberMethod> subscribersOf(EventClass eventClass, MessageClass originClass);  }