#113 Event Driven Architecture

Adds various changes including :
- Fixes to Javadoc
- Test refactoring and improvements
- Refactored EventDispatcher to be immutable
- Removed DynamicRouter interface since it not needed
- Renamed Channel to a more appropriate name - Handler
This commit is contained in:
cfarrugia
2015-12-01 23:30:01 +01:00
parent 9e857d7dd6
commit cfb0fafc7d
16 changed files with 156 additions and 154 deletions

View File

@@ -0,0 +1,24 @@
package com.iluwatar.eda.event;
import com.iluwatar.eda.model.User;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
/**
* {@link UserCreatedEventTest} tests and verifies {@link Event} behaviour.
*/
public class UserCreatedEventTest {
/**
* This unit test should correctly return the {@link Event} class type when calling the
* {@link Event#getType() getType} method.
*/
@Test
public void testGetEventType() {
User user = new User("iluwatar");
UserCreatedEvent userCreatedEvent = new UserCreatedEvent(user);
assertEquals(UserCreatedEvent.class, userCreatedEvent.getType());
}
}