geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject cvs commit: incubator-geronimo/modules/core/src/test/javax/enterprise/deploy/model XPathEventTest.java TestXPathEvent.java
Date Wed, 13 Aug 2003 20:24:00 GMT
jboynes     2003/08/13 13:24:00

  Added:       modules/core/src/test/javax/enterprise/deploy/shared
                        ActionTypeTest.java CommandTypeTest.java
                        DConfigBeanVersionTypeTest.java ModuleTypeTest.java
                        StateTypeTest.java
               modules/core/src/test/javax/enterprise/deploy/model
                        XPathEventTest.java
  Removed:     modules/core/src/test/javax/enterprise/deploy/shared
                        TestActionType.java TestCommandType.java
                        TestDConfigBeanVersionType.java TestModuleType.java
                        TestStateType.java
               modules/core/src/test/javax/enterprise/deploy/model
                        TestXPathEvent.java
  Log:
  Rename from TestX to XTest so maven finds them
  
  Revision  Changes    Path
  1.1                  incubator-geronimo/modules/core/src/test/javax/enterprise/deploy/shared/ActionTypeTest.java
  
  Index: ActionTypeTest.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  package javax.enterprise.deploy.shared;
  
  import junit.framework.TestCase;
  
  public class ActionTypeTest extends TestCase {
  
      public void testValues() {
          assertEquals(0, ActionType.EXECUTE.getValue());
          assertEquals(1, ActionType.CANCEL.getValue());
          assertEquals(2, ActionType.STOP.getValue());
      }
  
      public void testToString() {
          assertEquals("execute", ActionType.EXECUTE.toString());
          assertEquals("cancel", ActionType.CANCEL.toString());
          assertEquals("stop", ActionType.STOP.toString());
          // only possible due to package local access
          assertEquals("5", new ActionType(5).toString());
      }
  
      public void testValueToSmall() {
          try {
              ActionType.getActionType(-1);
              fail("Expected AIOOBE");
          } catch (ArrayIndexOutOfBoundsException aioobe) {
          }
      }
  
      public void testValueToLarge() {
          try {
              ActionType.getActionType(5);
              fail("Expected AIOOBE");
          } catch (ArrayIndexOutOfBoundsException aioobe) {
          }
      }
  }
  
  
  
  
  1.1                  incubator-geronimo/modules/core/src/test/javax/enterprise/deploy/shared/CommandTypeTest.java
  
  Index: CommandTypeTest.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  package javax.enterprise.deploy.shared;
  
  import junit.framework.TestCase;
  
  public class CommandTypeTest extends TestCase {
      public void testValues() {
          assertEquals(0, CommandType.DISTRIBUTE.getValue());
          assertEquals(1, CommandType.START.getValue());
          assertEquals(2, CommandType.STOP.getValue());
          assertEquals(3, CommandType.UNDEPLOY.getValue());
          assertEquals(4, CommandType.REDEPLOY.getValue());
      }
  
      public void testToString() {
          assertEquals("distribute", CommandType.DISTRIBUTE.toString());
          assertEquals("start", CommandType.START.toString());
          assertEquals("stop", CommandType.STOP.toString());
          assertEquals("undeploy", CommandType.UNDEPLOY.toString());
          assertEquals("redeploy", CommandType.REDEPLOY.toString());
          // only possible due to package local access
          assertEquals("10", new ActionType(10).toString());
          assertEquals("-1", new ActionType(-1).toString());
      }
  
      public void testValueToSmall() {
          try {
              CommandType.getCommandType(-1);
              fail("Expected AIOOBE");
          } catch (ArrayIndexOutOfBoundsException aioobe) {
          }
      }
  
      public void testValueToLarge() {
          try {
              CommandType.getCommandType(10);
              fail("Expected AIOOBE");
          } catch (ArrayIndexOutOfBoundsException aioobe) {
          }
      }
  }
  
  
  
  1.1                  incubator-geronimo/modules/core/src/test/javax/enterprise/deploy/shared/DConfigBeanVersionTypeTest.java
  
  Index: DConfigBeanVersionTypeTest.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  package javax.enterprise.deploy.shared;
  
  import junit.framework.TestCase;
  
  /**
  DConfigBeanVersionType
   */
  public class DConfigBeanVersionTypeTest extends TestCase {
       public void testValues() {
          assertEquals(0, DConfigBeanVersionType.V1_3.getValue());
          assertEquals(1, DConfigBeanVersionType.V1_3_1.getValue());
          assertEquals(2, DConfigBeanVersionType.V1_4.getValue());
      }
  
      public void testToString() {
          assertEquals("V1_3", DConfigBeanVersionType.V1_3.toString());
          assertEquals("V1_3_1", DConfigBeanVersionType.V1_3_1.toString());
          assertEquals("V1_4", DConfigBeanVersionType.V1_4.toString());
          // only possible due to package local access
          assertEquals("5", new ActionType(5).toString());
      }
  
      public void testValueToSmall() {
          try {
              DConfigBeanVersionType.getDConfigBeanVersionType(-1);
              fail("Expected AIOOBE");
          } catch (ArrayIndexOutOfBoundsException aioobe) {
          }
      }
  
      public void testValueToLarge() {
          try {
              DConfigBeanVersionType.getDConfigBeanVersionType(3);
              fail("Expected AIOOBE");
          } catch (ArrayIndexOutOfBoundsException aioobe) {
          }
      }
  }
  
  
  
  1.1                  incubator-geronimo/modules/core/src/test/javax/enterprise/deploy/shared/ModuleTypeTest.java
  
  Index: ModuleTypeTest.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  package javax.enterprise.deploy.shared;
  
  import junit.framework.TestCase;
  
  public class ModuleTypeTest extends TestCase {
        public void testValues() {
          assertEquals(0, ModuleType.EAR.getValue());
          assertEquals(1, ModuleType.EJB.getValue());
          assertEquals(2, ModuleType.CAR.getValue());
          assertEquals(3, ModuleType.RAR.getValue());
          assertEquals(4, ModuleType.WAR.getValue());
      }
  
      public void testToString() {
          assertEquals("ear", ModuleType.EAR.toString());
          assertEquals("ejb", ModuleType.EJB.toString());
          assertEquals("car", ModuleType.CAR.toString());
          assertEquals("rar", ModuleType.RAR.toString());
          assertEquals("war", ModuleType.WAR.toString());
          // only possible due to package local access
          assertEquals("5", new ModuleType(5).toString());
      }
  
      public void testModuleExtension() {
          assertEquals(".ear", ModuleType.EAR.getModuleExtension());
          assertEquals(".jar", ModuleType.EJB.getModuleExtension());
          assertEquals(".jar", ModuleType.CAR.getModuleExtension());
          assertEquals(".rar", ModuleType.RAR.getModuleExtension());
          assertEquals(".war", ModuleType.WAR.getModuleExtension());
      }
  
      public void testValueToSmall() {
          try {
              ModuleType.getModuleType(-1);
              fail("Expected AIOOBE");
          } catch (ArrayIndexOutOfBoundsException aioobe) {
          }
      }
  
      public void testValueToLarge() {
          try {
              ModuleType.getModuleType(5);
              fail("Expected AIOOBE");
          } catch (ArrayIndexOutOfBoundsException aioobe) {
          }
      }
  }
  
  
  
  1.1                  incubator-geronimo/modules/core/src/test/javax/enterprise/deploy/shared/StateTypeTest.java
  
  Index: StateTypeTest.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  package javax.enterprise.deploy.shared;
  
  import junit.framework.TestCase;
  
  public class StateTypeTest extends TestCase {
      public void testValues() {
          assertEquals(0, StateType.RUNNING.getValue());
          assertEquals(1, StateType.COMPLETED.getValue());
          assertEquals(2, StateType.FAILED.getValue());
          assertEquals(3, StateType.RELEASED.getValue());
      }
  
      public void testToString() {
          assertEquals("running", StateType.RUNNING.toString());
          assertEquals("completed", StateType.COMPLETED.toString());
          assertEquals("failed", StateType.FAILED.toString());
          assertEquals("released", StateType.RELEASED.toString());
          // only possible due to package local access
          assertEquals("5", new ActionType(5).toString());
      }
  
      public void testValueToSmall() {
          try {
              StateType.getStateType(-1);
              fail("Expected AIOOBE");
          } catch (ArrayIndexOutOfBoundsException aioobe) {
          }
      }
  
      public void testValueToLarge() {
          try {
              StateType.getStateType(5);
              fail("Expected AIOOBE");
          } catch (ArrayIndexOutOfBoundsException aioobe) {
          }
      }
  }
  
  
  
  1.1                  incubator-geronimo/modules/core/src/test/javax/enterprise/deploy/model/XPathEventTest.java
  
  Index: XPathEventTest.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  package javax.enterprise.deploy.model;
  
  import junit.framework.TestCase;
  
  public class XPathEventTest extends TestCase {
  
       public void testIsAddEvent() {
          XpathEvent addEvent = new XpathEvent(null, XpathEvent.BEAN_ADDED);
          assertTrue(addEvent.isAddEvent());
          assertFalse(addEvent.isChangeEvent());
          assertFalse(addEvent.isRemoveEvent());
      }
  
      public void testIsChangeEvent() {
          XpathEvent changeEvent = new XpathEvent(null, XpathEvent.BEAN_CHANGED);
          assertTrue(changeEvent.isChangeEvent());
          assertFalse(changeEvent.isAddEvent());
          assertFalse(changeEvent.isRemoveEvent());
      }
  
      public void testIsRemoveEvent() {
          XpathEvent removeEvent = new XpathEvent(null, XpathEvent.BEAN_REMOVED);
          assertTrue(removeEvent.isRemoveEvent());
          assertFalse(removeEvent.isAddEvent());
          assertFalse(removeEvent.isChangeEvent());
      }
  
  }
  
  
  

Mime
View raw message