[jboss-cvs] JBossAS SVN: r95539 - in projects/embedded/trunk/core/src/test/java: org and 4 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Oct 23 22:16:31 EDT 2009


Author: ALRubinger
Date: 2009-10-23 22:16:31 -0400 (Fri, 23 Oct 2009)
New Revision: 95539

Added:
   projects/embedded/trunk/core/src/test/java/org/
   projects/embedded/trunk/core/src/test/java/org/jboss/
   projects/embedded/trunk/core/src/test/java/org/jboss/embedded/
   projects/embedded/trunk/core/src/test/java/org/jboss/embedded/core/
   projects/embedded/trunk/core/src/test/java/org/jboss/embedded/core/server/
   projects/embedded/trunk/core/src/test/java/org/jboss/embedded/core/server/JBossASEmbeddedServerFactoryUnitTestCase.java
Log:
[EMB-56] Add test for the API Server Factory

Added: projects/embedded/trunk/core/src/test/java/org/jboss/embedded/core/server/JBossASEmbeddedServerFactoryUnitTestCase.java
===================================================================
--- projects/embedded/trunk/core/src/test/java/org/jboss/embedded/core/server/JBossASEmbeddedServerFactoryUnitTestCase.java	                        (rev 0)
+++ projects/embedded/trunk/core/src/test/java/org/jboss/embedded/core/server/JBossASEmbeddedServerFactoryUnitTestCase.java	2009-10-24 02:16:31 UTC (rev 95539)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed 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.jboss.embedded.core.server;
+
+import junit.framework.TestCase;
+
+import org.jboss.embedded.api.server.JBossASEmbeddedServer;
+import org.jboss.embedded.api.server.JBossASEmbeddedServerFactory;
+import org.junit.Test;
+
+/**
+ * JBossASEmbeddedServerFactoryUnitTestCase
+ * 
+ * Tests to ensure that the API's Server Factory is working as expected
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class JBossASEmbeddedServerFactoryUnitTestCase
+{
+   //-------------------------------------------------------------------------------------||
+   // Tests ------------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Ensures that a new server instance may be created from the API's Server Factory
+    */
+   @Test
+   public void testServerFactory() throws Exception
+   {
+      final JBossASEmbeddedServer server = JBossASEmbeddedServerFactory.createServer();
+      // Ensure we have a non-null type (because the compiler will ensure that the runtime type is OK from this end)
+      TestCase.assertNotNull("Server factory returned a null server instance", server);
+   }
+}




More information about the jboss-cvs-commits mailing list