1 17 18 24 package javax.enterprise.deploy.model; 25 26 import junit.framework.TestCase; 27 28 public class XPathEventTest extends TestCase { 29 30 public void testIsAddEvent() { 31 XpathEvent addEvent = new XpathEvent(null, XpathEvent.BEAN_ADDED); 32 assertTrue(addEvent.isAddEvent()); 33 assertFalse(addEvent.isChangeEvent()); 34 assertFalse(addEvent.isRemoveEvent()); 35 } 36 37 public void testIsChangeEvent() { 38 XpathEvent changeEvent = new XpathEvent(null, XpathEvent.BEAN_CHANGED); 39 assertTrue(changeEvent.isChangeEvent()); 40 assertFalse(changeEvent.isAddEvent()); 41 assertFalse(changeEvent.isRemoveEvent()); 42 } 43 44 public void testIsRemoveEvent() { 45 XpathEvent removeEvent = new XpathEvent(null, XpathEvent.BEAN_REMOVED); 46 assertTrue(removeEvent.isRemoveEvent()); 47 assertFalse(removeEvent.isAddEvent()); 48 assertFalse(removeEvent.isChangeEvent()); 49 } 50 51 } 52 | Popular Tags |