// Path: core/src/java/com/strategicgains/eventing/local/LocalEventBus.java
// public class LocalEventBus
// extends EventBus
// {
// 	public LocalEventBus(Collection<EventHandler> handlers, boolean shouldReraiseOnError, long pollDelayMillis)
// 	{
// 		super(new LocalEventTransport(handlers, shouldReraiseOnError, pollDelayMillis));
// 	}
// 
// 	/**
// 	 * @param value
// 	 */
//     public void retryOnError(boolean value)
//     {
//     	((LocalEventTransport) getTransport()).retryOnError(value);
//     }
// }
// 
// Path: core/src/java/com/strategicgains/eventing/local/LocalEventBusBuilder.java
// public class LocalEventBusBuilder
// implements EventBusBuilder<LocalEventBus, LocalEventBusBuilder>
// {
// 	private static final long DEFAULT_POLL_DELAY = 0L;
// 
// 	private Set<EventHandler> subscribers = new LinkedHashSet<EventHandler>();
// 	private Set<Class<?>> publishableEventTypes = new HashSet<Class<?>>();
// 	private boolean shouldRepublishOnError = false;
// 	private long pollDelay = DEFAULT_POLL_DELAY;
// 
// 	public LocalEventBusBuilder()
// 	{
// 		super();
// 	}
// 
// 	@Override
// 	public LocalEventBus build()
// 	{
// 		assert(!subscribers.isEmpty());
// 
// 		LocalEventBus bus = new LocalEventBus(subscribers, shouldRepublishOnError, pollDelay);
// 		
// 		for (Class<?> eventType : publishableEventTypes)
// 		{
// 			bus.addPublishableEventType(eventType);
// 		}
// 		
// 		return bus;
// 	}
// 
//     public LocalEventBusBuilder shouldRepublishOnError(boolean value)
//     {
//     	this.shouldRepublishOnError = value;
// 	    return this;
//     }
//     
//     public LocalEventBusBuilder pollDelay(long millis)
//     {
//     	this.pollDelay = millis;
//     	return this;
//     }
// 
//     @Override
//     public LocalEventBusBuilder subscribe(EventHandler handler)
//     {
//     	if (!subscribers.contains(handler))
//     	{
//     		subscribers.add(handler);
//     	}
//     	
//     	return this;
//     }
// 
//     @Override
//     public LocalEventBusBuilder unsubscribe(EventHandler handler)
//     {
//     	subscribers.remove(handler);
//     	return this;
//     }
//     
//     public LocalEventBusBuilder addPublishableEventType(Class<?> eventType)
//     {
//     	publishableEventTypes.add(eventType);
//     	return this;
//     }
// }


import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import com.strategicgains.eventing.local.LocalEventBus;
import com.strategicgains.eventing.local.LocalEventBusBuilder;
/*
    Copyright 2011, Strategic Gains, Inc.

	Licensed under the Apache License, Version 2.0 (the "License");
	you may not use this file except in compliance with the License.
	You may obtain a copy of the License at

		http://www.apache.org/licenses/LICENSE-2.0

	Unless required by applicable law or agreed to in writing, software
	distributed under the License is distributed on an "AS IS" BASIS,
	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	See the License for the specific language governing permissions and
	limitations under the License.
*/
package com.strategicgains.eventing;





/**
 * @author toddf
 * @since May 18, 2011
 */
public class DomainEventsTest
{
	private DomainEventsTestHandler handler = new DomainEventsTestHandler();
	private DomainEventsTestIgnoredEventsHandler ignoredHandler = new DomainEventsTestIgnoredEventsHandler();
	private DomainEventsTestLongEventHandler longHandler = new DomainEventsTestLongEventHandler();

	@Before
	public void setup()
	{
// Path: core/src/java/com/strategicgains/eventing/local/LocalEventBus.java
// public class LocalEventBus
// extends EventBus
// {
// 	public LocalEventBus(Collection<EventHandler> handlers, boolean shouldReraiseOnError, long pollDelayMillis)
// 	{
// 		super(new LocalEventTransport(handlers, shouldReraiseOnError, pollDelayMillis));
// 	}
// 
// 	/**
// 	 * @param value
// 	 */
//     public void retryOnError(boolean value)
//     {
//     	((LocalEventTransport) getTransport()).retryOnError(value);
//     }
// }
// 
// Path: core/src/java/com/strategicgains/eventing/local/LocalEventBusBuilder.java
// public class LocalEventBusBuilder
// implements EventBusBuilder<LocalEventBus, LocalEventBusBuilder>
// {
// 	private static final long DEFAULT_POLL_DELAY = 0L;
// 
// 	private Set<EventHandler> subscribers = new LinkedHashSet<EventHandler>();
// 	private Set<Class<?>> publishableEventTypes = new HashSet<Class<?>>();
// 	private boolean shouldRepublishOnError = false;
// 	private long pollDelay = DEFAULT_POLL_DELAY;
// 
// 	public LocalEventBusBuilder()
// 	{
// 		super();
// 	}
// 
// 	@Override
// 	public LocalEventBus build()
// 	{
// 		assert(!subscribers.isEmpty());
// 
// 		LocalEventBus bus = new LocalEventBus(subscribers, shouldRepublishOnError, pollDelay);
// 		
// 		for (Class<?> eventType : publishableEventTypes)
// 		{
// 			bus.addPublishableEventType(eventType);
// 		}
// 		
// 		return bus;
// 	}
// 
//     public LocalEventBusBuilder shouldRepublishOnError(boolean value)
//     {
//     	this.shouldRepublishOnError = value;
// 	    return this;
//     }
//     
//     public LocalEventBusBuilder pollDelay(long millis)
//     {
//     	this.pollDelay = millis;
//     	return this;
//     }
// 
//     @Override
//     public LocalEventBusBuilder subscribe(EventHandler handler)
//     {
//     	if (!subscribers.contains(handler))
//     	{
//     		subscribers.add(handler);
//     	}
//     	
//     	return this;
//     }
// 
//     @Override
//     public LocalEventBusBuilder unsubscribe(EventHandler handler)
//     {
//     	subscribers.remove(handler);
//     	return this;
//     }
//     
//     public LocalEventBusBuilder addPublishableEventType(Class<?> eventType)
//     {
//     	publishableEventTypes.add(eventType);
//     	return this;
//     }
// }


// Path: core/test/java/com/strategicgains/eventing/DomainEventsTest.java
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import com.strategicgains.eventing.local.LocalEventBus;
import com.strategicgains.eventing.local.LocalEventBusBuilder;

/*
    Copyright 2011, Strategic Gains, Inc.

	Licensed under the Apache License, Version 2.0 (the "License");
	you may not use this file except in compliance with the License.
	You may obtain a copy of the License at

		http://www.apache.org/licenses/LICENSE-2.0

	Unless required by applicable law or agreed to in writing, software
	distributed under the License is distributed on an "AS IS" BASIS,
	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	See the License for the specific language governing permissions and
	limitations under the License.
*/
package com.strategicgains.eventing;





/**
 * @author toddf
 * @since May 18, 2011
 */
public class DomainEventsTest
{
	private DomainEventsTestHandler handler = new DomainEventsTestHandler();
	private DomainEventsTestIgnoredEventsHandler ignoredHandler = new DomainEventsTestIgnoredEventsHandler();
	private DomainEventsTestLongEventHandler longHandler = new DomainEventsTestLongEventHandler();

	@Before
	public void setup()
	{
		EventBus q = new LocalEventBusBuilder()