@Test public void event_type_match_is_case_insensitive() { ComponentEventCallback handler = mockComponentEventHandler(); EventContext context = mockEventContext(); Logger logger = mockLogger(); ComponentModel model = mockComponentModel(); train_isDebugEnabled(logger, false); train_getCount(context, 0); replay(); ComponentEvent event = new ComponentEventImpl("eventType", "someId", context, handler, null, false, model, logger); assertTrue(event.matches("EVENTTYPE", "someid", 0)); verify(); }
public boolean matches(String eventType, String componentId, int parameterCount) { if (isAborted()) return false; boolean parameterCountMatch = exactParameterCountMatch ? context.getCount() == parameterCount : context.getCount() >= parameterCount; return this.eventType.equalsIgnoreCase(eventType) && parameterCountMatch && (originatingComponentId.equalsIgnoreCase(componentId) || componentId.equals("")); }
ComponentEventImpl extends EventImpl implements ComponentEvent { public boolean matches(String eventType, String componentId, int parameterCount) { if (isAborted()) return false; boolean parameterCountMatch = exactParameterCountMatch ? context.getCount() == parameterCount : context.getCount() >= parameterCount; return this.eventType.equalsIgnoreCase(eventType) && parameterCountMatch && (originatingComponentId.equalsIgnoreCase(componentId) || componentId.equals("")); } }
ComponentEventImpl extends EventImpl implements ComponentEvent { public boolean matches(String eventType, String componentId, int parameterCount) { if (isAborted()) return false; boolean parameterCountMatch = exactParameterCountMatch ? context.getCount() == parameterCount : context.getCount() >= parameterCount; return this.eventType.equalsIgnoreCase(eventType) && parameterCountMatch && (originatingComponentId.equalsIgnoreCase(componentId) || componentId.equals("")); } ComponentEventImpl(String eventType, String originatingComponentId, EventContext context,
            ComponentEventCallback handler, ComponentPageElementResources elementResources,
            boolean exactParameterCountMatch, ComponentModel model, Logger logger); }
ComponentEventImpl extends EventImpl implements ComponentEvent { public boolean matches(String eventType, String componentId, int parameterCount) { if (isAborted()) return false; boolean parameterCountMatch = exactParameterCountMatch ? context.getCount() == parameterCount : context.getCount() >= parameterCount; return this.eventType.equalsIgnoreCase(eventType) && parameterCountMatch && (originatingComponentId.equalsIgnoreCase(componentId) || componentId.equals("")); } ComponentEventImpl(String eventType, String originatingComponentId, EventContext context,
            ComponentEventCallback handler, ComponentPageElementResources elementResources,
            boolean exactParameterCountMatch, ComponentModel model, Logger logger); @Override String toString(); boolean matches(String eventType, String componentId, int parameterCount); @SuppressWarnings("unchecked") Object coerceContext(int index, String desiredTypeName); Object[] getContext(); EventContext getEventContext(); }
ComponentEventImpl extends EventImpl implements ComponentEvent { public boolean matches(String eventType, String componentId, int parameterCount) { if (isAborted()) return false; boolean parameterCountMatch = exactParameterCountMatch ? context.getCount() == parameterCount : context.getCount() >= parameterCount; return this.eventType.equalsIgnoreCase(eventType) && parameterCountMatch && (originatingComponentId.equalsIgnoreCase(componentId) || componentId.equals("")); } ComponentEventImpl(String eventType, String originatingComponentId, EventContext context,
            ComponentEventCallback handler, ComponentPageElementResources elementResources,
            boolean exactParameterCountMatch, ComponentModel model, Logger logger); @Override String toString(); boolean matches(String eventType, String componentId, int parameterCount); @SuppressWarnings("unchecked") Object coerceContext(int index, String desiredTypeName); Object[] getContext(); EventContext getEventContext();  }