[jboss-cvs] JBossAS SVN: r73418 - trunk/testsuite/src/main/org/jboss/test/deployers/ear/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu May 15 10:01:10 EDT 2008


Author: alex.loubyansky at jboss.com
Date: 2008-05-15 10:01:10 -0400 (Thu, 15 May 2008)
New Revision: 73418

Added:
   trunk/testsuite/src/main/org/jboss/test/deployers/ear/test/JBossAppParsingDeployerUnitTestCase.java
Log:
JBAS-5524

Added: trunk/testsuite/src/main/org/jboss/test/deployers/ear/test/JBossAppParsingDeployerUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/deployers/ear/test/JBossAppParsingDeployerUnitTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/deployers/ear/test/JBossAppParsingDeployerUnitTestCase.java	2008-05-15 14:01:10 UTC (rev 73418)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.ear.test;
+
+import org.jboss.deployers.vfs.plugins.structure.AbstractVFSDeploymentContext;
+import org.jboss.deployers.vfs.plugins.structure.AbstractVFSDeploymentUnit;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
+import org.jboss.deployment.JBossAppParsingDeployer;
+import org.jboss.metadata.ear.spec.EarMetaData;
+import org.jboss.mx.loading.LoaderRepositoryFactory.LoaderRepositoryConfig;
+
+import junit.framework.TestCase;
+
+/**
+* @author <a href="mailto:alex at jboss.com">Alexey Loubyansky</a>
+* @version $Revision: 72883 $
+ */
+public class JBossAppParsingDeployerUnitTestCase extends TestCase
+{
+   public void testDefaultIsolationConfig() throws Exception
+   {
+      VFSDeploymentContext dc = new AbstractVFSDeploymentContext();
+      AbstractVFSDeploymentUnit unit = new AbstractVFSDeploymentUnit(dc);
+      unit.addAttachment(EarMetaData.class, new EarMetaData());
+      JBossAppParsingDeployer deployer = new JBossAppParsingDeployer();
+      
+      // isolated is false
+      deployer.deploy(unit);      
+      LoaderRepositoryConfig attachment = unit.getAttachment(LoaderRepositoryConfig.class);
+      assertNull(attachment);
+      
+      // isolated is true
+      deployer.setIsolated(true);
+      dc = new AbstractVFSDeploymentContext();
+      unit = new AbstractVFSDeploymentUnit(dc);
+      unit.addAttachment(EarMetaData.class, new EarMetaData());
+      deployer.deploy(unit);
+      attachment = unit.getAttachment(LoaderRepositoryConfig.class);
+      assertNotNull(attachment);  
+   }
+}




More information about the jboss-cvs-commits mailing list