@Test public void false_is_allowed() { Component component = mockComponent(); replay(); NotificationEventCallback callback = new NotificationEventCallback(EVENT_TYPE, COMPLETE_ID); assertFalse(callback.handleResult(Boolean.FALSE)); verify(); }
public boolean handleResult(Object result) { if (result instanceof Boolean) return ((Boolean) result); throw new IllegalArgumentException( String.format("Event '%s' from %s received an event handler method return value of %s. This type of event does not support return values from event handler methods.", eventType, completeId, String .valueOf(result))); }
NotificationEventCallback implements ComponentEventCallback { public boolean handleResult(Object result) { if (result instanceof Boolean) return ((Boolean) result); throw new IllegalArgumentException( String.format("Event '%s' from %s received an event handler method return value of %s. This type of event does not support return values from event handler methods.", eventType, completeId, String .valueOf(result))); } }
NotificationEventCallback implements ComponentEventCallback { public boolean handleResult(Object result) { if (result instanceof Boolean) return ((Boolean) result); throw new IllegalArgumentException( String.format("Event '%s' from %s received an event handler method return value of %s. This type of event does not support return values from event handler methods.", eventType, completeId, String .valueOf(result))); } NotificationEventCallback(String eventType, String completeId); }
NotificationEventCallback implements ComponentEventCallback { public boolean handleResult(Object result) { if (result instanceof Boolean) return ((Boolean) result); throw new IllegalArgumentException( String.format("Event '%s' from %s received an event handler method return value of %s. This type of event does not support return values from event handler methods.", eventType, completeId, String .valueOf(result))); } NotificationEventCallback(String eventType, String completeId); boolean handleResult(Object result); }
NotificationEventCallback implements ComponentEventCallback { public boolean handleResult(Object result) { if (result instanceof Boolean) return ((Boolean) result); throw new IllegalArgumentException( String.format("Event '%s' from %s received an event handler method return value of %s. This type of event does not support return values from event handler methods.", eventType, completeId, String .valueOf(result))); } NotificationEventCallback(String eventType, String completeId); boolean handleResult(Object result);  }