001 package org.springframework.richclient.application.event; 002 003 import junit.framework.TestCase; 004 005 public class LifecycleApplicationEventTests extends TestCase { 006 007 private class Base { 008 } 009 010 private class Child extends Base { 011 } 012 013 /** 014 * Simple test to check {@link LifecycleApplicationEvent#objectIs(Class)}. 015 */ 016 public void testEventObjectType() { 017 Child child = new Child(); 018 LifecycleApplicationEvent event = new LifecycleApplicationEvent(LifecycleApplicationEvent.CREATED, child); 019 assertTrue("Child extends Base so objectIs() should return true.", event.objectIs(Base.class)); 020 } 021 022 }