cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r467946 - in /incubator/cxf/trunk/integration/jbi/src/test/java/org: ./ apache/ apache/cxf/ apache/cxf/jbi/ apache/cxf/jbi/se/ apache/cxf/jbi/se/state/ apache/cxf/jbi/transport/
Date Thu, 26 Oct 2006 10:15:13 GMT
Author: ffang
Date: Thu Oct 26 03:15:08 2006
New Revision: 467946

URL: http://svn.apache.org/viewvc?view=rev&rev=467946
Log:
[CXF-38] JBI Integration -- add test framework

Added:
    incubator/cxf/trunk/integration/jbi/src/test/java/org/
    incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/
    incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/
    incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/
    incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/
    incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/CXFServiceUnitManagerTest.java
  (with props)
    incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/
    incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineShutdownTest.java
  (with props)
    incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStartTest.java
  (with props)
    incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStateFactoryTest.java
  (with props)
    incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStopTest.java
  (with props)
    incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/transport/

Added: incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/CXFServiceUnitManagerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/CXFServiceUnitManagerTest.java?view=auto&rev=467946
==============================================================================
--- incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/CXFServiceUnitManagerTest.java
(added)
+++ incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/CXFServiceUnitManagerTest.java
Thu Oct 26 03:15:08 2006
@@ -0,0 +1,283 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.cxf.jbi.se;
+
+import java.net.URL;
+import java.util.logging.Logger;
+
+import javax.jbi.component.ComponentContext;
+import javax.jbi.management.DeploymentException;
+
+import junit.framework.TestCase;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.common.logging.LogUtils;
+import org.easymock.EasyMock;
+
+public class CXFServiceUnitManagerTest extends TestCase {
+    
+    private static final Logger LOG = LogUtils.getL7dLogger(CXFServiceUnitManagerTest.class);
+
+    //private static final String CELTIX_CONFIG = 
+    //    "/components/CeltixServiceEngine/version_1/META-INF/celtix-config.xml";
+    private CXFServiceUnitManager csuManager;
+    private ComponentContext ctx = EasyMock.createMock(ComponentContext.class);
+    private Bus bus;    
+    
+    public void setUp() throws Exception {
+        Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
+        //System.setProperty("celtix.config.file", getClass().getResource(CELTIX_CONFIG).toString());
+        
+        bus = new SpringBusFactory().createBus();
+        ComponentClassLoader componentClassLoader = 
+            new ComponentClassLoader(new URL[0], getClass().getClassLoader());
+        csuManager = new CXFServiceUnitManager(bus, ctx, componentClassLoader);
+    }
+    
+    public void tearDown() throws Exception {
+        bus.shutdown(false);
+    }
+    
+    public void testShutdownWithNull() throws Exception {
+        
+        try {
+            csuManager.shutDown(null);
+        } catch (DeploymentException e) {
+            assertEquals(e.getMessage(), new Message("SU.NAME.NULL", LOG).toString());
+            return;
+        }
+        fail("should get DeploymentException");        
+    }
+    
+    public void testShutdownWithEmpty() throws Exception {
+        
+        try {
+            csuManager.shutDown("");
+        } catch (DeploymentException e) {
+            assertEquals(e.getMessage(), new Message("SU.NAME.EMPTY", LOG).toString());
+            return;
+        }
+        fail("should get DeploymentException");        
+    }
+    
+    public void testShutdownWithUndeployedSU() {
+        try {
+            csuManager.shutDown("dummySU");
+        } catch (DeploymentException e) {
+            assertEquals(e.getMessage(), new Message("UNDEPLOYED.SU", LOG).toString() + "dummySU");
+            return;
+        }
+        fail("should get DeploymentException");
+    }
+    
+
+    public void testDeployWithNullSUName() throws Exception {
+        
+        try {
+            csuManager.deploy(null, "dummyRoot");
+        } catch (DeploymentException e) {
+            assertEquals(e.getMessage(), new Message("SU.NAME.NULL", LOG).toString());
+            return;
+        }
+        fail("should get DeploymentException");        
+    }
+    
+    public void testDeployWithEmptySUName() throws Exception {
+        
+        try {
+            csuManager.deploy("", "dummyRoot");
+        } catch (DeploymentException e) {
+            assertEquals(e.getMessage(), new Message("SU.NAME.EMPTY", LOG).toString());
+            return;
+        }
+        fail("should get DeploymentException");        
+    }
+    
+    public void testDeployWithDuplicatedSU() {
+        try {
+            csuManager.deploy("dummySU", "dummyRoot");
+            csuManager.init("dummySU", "dummyRoot");
+            csuManager.deploy("dummySU", "dummyRoot");
+        } catch (DeploymentException e) {
+            assertEquals(e.getMessage(), new Message("DUPLICATED.SU", LOG).toString() + "dummySU");
+            return;
+        }
+        fail("should get DeploymentException");
+    }
+
+    public void testDeployWithNullSURoot() throws Exception {
+        
+        try {
+            csuManager.deploy("dummySU", null);
+        } catch (DeploymentException e) {
+            assertEquals(e.getMessage(), new Message("SU.ROOT.NULL", LOG).toString());
+            return;
+        }
+        fail("should get DeploymentException");        
+    }
+    
+    public void testDeployWithEmptySURoot() throws Exception {
+        
+        try {
+            csuManager.deploy("dummySU", "");
+        } catch (DeploymentException e) {
+            assertEquals(e.getMessage(), new Message("SU.ROOT.EMPTY", LOG).toString());
+            return;
+        }
+        fail("should get DeploymentException");        
+    }
+    
+    public void testUndeployWithNullSUName() throws Exception {
+        
+        try {
+            csuManager.undeploy(null, "dummyRoot");
+        } catch (DeploymentException e) {
+            assertEquals(e.getMessage(), new Message("SU.NAME.NULL", LOG).toString());
+            return;
+        }
+        fail("should get DeploymentException");        
+    }
+    
+    public void testUndeployWithEmptySUName() throws Exception {
+        
+        try {
+            csuManager.undeploy("", "dummyRoot");
+        } catch (DeploymentException e) {
+            assertEquals(e.getMessage(), new Message("SU.NAME.EMPTY", LOG).toString());
+            return;
+        }
+        fail("should get DeploymentException");        
+    }
+    
+    
+    public void testUndeployWithNullSURoot() throws Exception {
+        
+        try {
+            csuManager.undeploy("dummySU", null);
+        } catch (DeploymentException e) {
+            assertEquals(e.getMessage(), new Message("SU.ROOT.NULL", LOG).toString());
+            return;
+        }
+        fail("should get DeploymentException");        
+    }
+    
+    public void testUndeployWithEmptySURoot() throws Exception {
+        
+        try {
+            csuManager.undeploy("dummySU", "");
+        } catch (DeploymentException e) {
+            assertEquals(e.getMessage(), new Message("SU.ROOT.EMPTY", LOG).toString());
+            return;
+        }
+        fail("should get DeploymentException");        
+    }
+    
+    public void testInitWithNullSUName() throws Exception {
+        
+        try {
+            csuManager.init(null, "dummyRoot");
+        } catch (DeploymentException e) {
+            assertEquals(e.getMessage(), new Message("SU.NAME.NULL", LOG).toString());
+            return;
+        }
+        fail("should get DeploymentException");        
+    }
+    
+    public void testInitWithEmptySUName() throws Exception {
+        
+        try {
+            csuManager.init("", "dummyRoot");
+        } catch (DeploymentException e) {
+            assertEquals(e.getMessage(), new Message("SU.NAME.EMPTY", LOG).toString());
+            return;
+        }
+        fail("should get DeploymentException");        
+    }
+    
+    
+    public void testInitWithNullSURoot() throws Exception {
+        
+        try {
+            csuManager.init("dummySU", null);
+        } catch (DeploymentException e) {
+            assertEquals(e.getMessage(), new Message("SU.ROOT.NULL", LOG).toString());
+            return;
+        }
+        fail("should get DeploymentException");        
+    }
+    
+    public void testInitWithEmptySURoot() throws Exception {
+        
+        try {
+            csuManager.init("dummySU", "");
+        } catch (DeploymentException e) {
+            assertEquals(e.getMessage(), new Message("SU.ROOT.EMPTY", LOG).toString());
+            return;
+        }
+        fail("should get DeploymentException");        
+    }
+    
+    public void testStartWithNullSUName() throws Exception {
+        
+        try {
+            csuManager.start(null);
+        } catch (DeploymentException e) {
+            assertEquals(e.getMessage(), new Message("SU.NAME.NULL", LOG).toString());
+            return;
+        }
+        fail("should get DeploymentException");        
+    }
+    
+    public void testStartWithEmptySUName() throws Exception {
+        
+        try {
+            csuManager.start("");
+        } catch (DeploymentException e) {
+            assertEquals(e.getMessage(), new Message("SU.NAME.EMPTY", LOG).toString());
+            return;
+        }
+        fail("should get DeploymentException");        
+    }
+    
+    public void testStopWithNullSUName() throws Exception {
+        
+        try {
+            csuManager.stop(null);
+        } catch (DeploymentException e) {
+            assertEquals(e.getMessage(), new Message("SU.NAME.NULL", LOG).toString());
+            return;
+        }
+        fail("should get DeploymentException");        
+    }
+    
+    public void testStopWithEmptySUName() throws Exception {
+        
+        try {
+            csuManager.stop("");
+        } catch (DeploymentException e) {
+            assertEquals(e.getMessage(), new Message("SU.NAME.EMPTY", LOG).toString());
+            return;
+        }
+        fail("should get DeploymentException");        
+    }
+    
+    
+}

Propchange: incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/CXFServiceUnitManagerTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/CXFServiceUnitManagerTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineShutdownTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineShutdownTest.java?view=auto&rev=467946
==============================================================================
--- incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineShutdownTest.java
(added)
+++ incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineShutdownTest.java
Thu Oct 26 03:15:08 2006
@@ -0,0 +1,70 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.cxf.jbi.se.state;
+
+import javax.jbi.JBIException;
+
+import junit.framework.TestCase;
+
+import org.apache.cxf.jbi.se.state.ServiceEngineStateMachine.SEOperation;
+
+public class ServiceEngineShutdownTest extends TestCase {
+    private ServiceEngineStateFactory stateFactory;
+    private ServiceEngineStateMachine shutdown;
+    
+    
+    public void setUp() throws Exception {
+        stateFactory = ServiceEngineStateFactory.getInstance();
+        shutdown = stateFactory.getShutdownState();
+    }
+    
+    public void testInitOperation() throws Exception {
+        shutdown.changeState(SEOperation.init, null);
+        assertTrue(stateFactory.getCurrentState() instanceof ServiceEngineStop);
+    }
+    
+    public void testStartOperation() throws Exception {
+        try {
+            shutdown.changeState(SEOperation.start, null);
+        } catch (JBIException e) {
+            return;
+        }
+        fail();
+    }
+    
+    public void testStopOperation() throws Exception {
+        try {
+            shutdown.changeState(SEOperation.stop, null);
+        } catch (JBIException e) {
+            return;
+        }
+        fail();
+    }
+    
+    public void testShutdownOperation() throws Exception {
+        try {
+            shutdown.changeState(SEOperation.shutdown, null);
+        } catch (JBIException e) {
+            return;
+        }
+        fail();
+    }
+
+}

Propchange: incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineShutdownTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineShutdownTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStartTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStartTest.java?view=auto&rev=467946
==============================================================================
--- incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStartTest.java
(added)
+++ incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStartTest.java
Thu Oct 26 03:15:08 2006
@@ -0,0 +1,68 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.cxf.jbi.se.state;
+
+import javax.jbi.JBIException;
+
+import junit.framework.TestCase;
+
+import org.apache.cxf.jbi.se.state.ServiceEngineStateMachine.SEOperation;
+
+public class ServiceEngineStartTest extends TestCase {
+    private ServiceEngineStateFactory stateFactory;
+    private ServiceEngineStateMachine start;
+    
+    public void setUp() throws Exception {
+        stateFactory = ServiceEngineStateFactory.getInstance();
+        start = stateFactory.getStartState();
+    }
+    
+    public void testStopOperation() throws Exception {
+        start.changeState(SEOperation.stop, null);
+        assertTrue(stateFactory.getCurrentState() instanceof ServiceEngineStop);
+    }
+    
+    public void testStartOperation() throws Exception {
+        try {
+            start.changeState(SEOperation.start, null);
+        } catch (JBIException e) {
+            return;
+        }
+        fail();
+    }
+    
+    public void testInitOperation() throws Exception {
+        try {
+            start.changeState(SEOperation.init, null);
+        } catch (JBIException e) {
+            return;
+        }
+        fail();
+    }
+    
+    public void testShutdownOperation() throws Exception {
+        try {
+            start.changeState(SEOperation.shutdown, null);
+        } catch (JBIException e) {
+            return;
+        }
+        fail();
+    }
+}

Propchange: incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStartTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStartTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStateFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStateFactoryTest.java?view=auto&rev=467946
==============================================================================
--- incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStateFactoryTest.java
(added)
+++ incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStateFactoryTest.java
Thu Oct 26 03:15:08 2006
@@ -0,0 +1,62 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.cxf.jbi.se.state;
+
+import junit.framework.TestCase;
+
+import org.apache.cxf.jbi.se.state.ServiceEngineStateMachine.SEOperation;
+
+public class ServiceEngineStateFactoryTest extends TestCase {
+    private ServiceEngineStateFactory stateFactory;
+    private ServiceEngineStateMachine state;
+        
+    public void setUp() throws Exception {
+        stateFactory = ServiceEngineStateFactory.getInstance();
+        state = stateFactory.getShutdownState();
+    }
+    
+    public void testSinglton() throws Exception {
+        assertSame(stateFactory, 
+                   ServiceEngineStateFactory.getInstance());
+    }
+    
+    public void testLifeCycle() throws Exception {
+        stateFactory.setCurrentState(state);
+        assertSame(state, stateFactory.getCurrentState());
+        assertTrue(stateFactory.getCurrentState() instanceof ServiceEngineShutdown);
+        state.changeState(SEOperation.init, null);
+        state = stateFactory.getCurrentState();
+        assertTrue(state instanceof ServiceEngineStop);
+        
+        state.changeState(SEOperation.start, null);
+        state = stateFactory.getCurrentState();
+        assertTrue(state instanceof ServiceEngineStart);
+        
+
+        state.changeState(SEOperation.stop, null);
+        state = stateFactory.getCurrentState();
+        assertTrue(state instanceof ServiceEngineStop);
+        
+        state.changeState(SEOperation.shutdown, null);
+        state = stateFactory.getCurrentState();
+        assertTrue(state instanceof ServiceEngineShutdown);
+    }
+
+}

Propchange: incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStateFactoryTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStateFactoryTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStopTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStopTest.java?view=auto&rev=467946
==============================================================================
--- incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStopTest.java
(added)
+++ incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStopTest.java
Thu Oct 26 03:15:08 2006
@@ -0,0 +1,65 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.cxf.jbi.se.state;
+
+import javax.jbi.JBIException;
+
+import junit.framework.TestCase;
+
+import org.apache.cxf.jbi.se.state.ServiceEngineStateMachine.SEOperation;
+
+public class ServiceEngineStopTest extends TestCase {
+
+    private ServiceEngineStateFactory stateFactory;
+    private ServiceEngineStateMachine stop;
+    
+    public void setUp() throws Exception {
+        stateFactory = ServiceEngineStateFactory.getInstance();
+        stop = stateFactory.getStopState();
+    }
+    
+    public void testStartOperation() throws Exception {
+        stop.changeState(SEOperation.start, null);
+        assertTrue(stateFactory.getCurrentState() instanceof ServiceEngineStart);
+    }
+    
+    public void testShutdownOperation() throws Exception {
+        stop.changeState(SEOperation.shutdown, null);
+        assertTrue(stateFactory.getCurrentState() instanceof ServiceEngineShutdown);
+    }
+    
+    public void testStopOperation() throws Exception {
+        try {
+            stop.changeState(SEOperation.stop, null);
+        } catch (JBIException e) {
+            return;
+        }
+        fail();
+    }
+    
+    public void testInitOperation() throws Exception {
+        try {
+            stop.changeState(SEOperation.init, null);
+        } catch (JBIException e) {
+            return;
+        }
+        fail();
+    }
+}

Propchange: incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStopTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStopTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



Mime
View raw message