[jboss-cvs] JBossAS SVN: r65845 - trunk/testsuite/src/main/org/jboss/test/ejbconf/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Oct 4 11:44:36 EDT 2007


Author: scott.stark at jboss.org
Date: 2007-10-04 11:44:36 -0400 (Thu, 04 Oct 2007)
New Revision: 65845

Removed:
   trunk/testsuite/src/main/org/jboss/test/ejbconf/test/MetaDataUnitTestCase.java
Log:
Drop the obsolete method-permission test as its in the metadata project now

Deleted: trunk/testsuite/src/main/org/jboss/test/ejbconf/test/MetaDataUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejbconf/test/MetaDataUnitTestCase.java	2007-10-04 15:36:27 UTC (rev 65844)
+++ trunk/testsuite/src/main/org/jboss/test/ejbconf/test/MetaDataUnitTestCase.java	2007-10-04 15:44:36 UTC (rev 65845)
@@ -1,84 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., 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.ejbconf.test;
-
-import java.net.URL;
-import java.util.Iterator;
-import java.util.Set;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.jboss.invocation.InvocationType;
-import org.jboss.metadata.ApplicationMetaData;
-import org.jboss.metadata.BeanMetaData;
-import org.jboss.metadata.MethodMetaData;
-import org.jboss.metadata.XmlFileLoader;
-import org.jboss.security.SimplePrincipal;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/** Tests of ejb-jar.xml metadata parsing.
- *
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class MetaDataUnitTestCase extends TestCase 
-{
-   public MetaDataUnitTestCase(String name)
-   {
-      super(name);
-   }
-
-   public static Test suite() throws Exception
-   {
-      TestSuite suite = new TestSuite(MetaDataUnitTestCase.class);
-      return suite;
-   }
-
-   public void testMethodPermissions() throws Exception
-   {
-      URL configURL = getClass().getResource("/ejbconf/ejb-jar-permission.xml");
-      if( configURL == null )
-         throw new Exception("Failed to find /ejbconf/ejb-jar-permission.xml");
-      Document configDoc = XmlFileLoader.getDocument(configURL, true);
-      ApplicationMetaData appData = new ApplicationMetaData();
-      appData.importEjbJarXml(configDoc.getDocumentElement());
-
-      SimplePrincipal echo = new SimplePrincipal("Echo");
-      SimplePrincipal echoLocal = new SimplePrincipal("EchoLocal");
-      SimplePrincipal internal = new SimplePrincipal("InternalRole");
-
-      BeanMetaData ss = appData.getBeanByEjbName("StatelessSession");
-      Class[] sig = {};
-      Set perms = ss.getMethodPermissions("create", sig, InvocationType.HOME);
-      assertTrue("Echo can invoke StatelessSessionHome.create", perms.contains(echo));
-      assertTrue("EchoLocal cannot invoke StatelessSessionHome.create", perms.contains(echoLocal) == false);
-
-      perms = ss.getMethodPermissions("create", sig, InvocationType.LOCALHOME);
-      assertTrue("Echo can invoke StatelessSessionLocalHome.create", perms.contains(echo));
-      assertTrue("EchoLocal can invoke StatelessSessionLocalHome.create", perms.contains(echoLocal));
-   }
-
-}




More information about the jboss-cvs-commits mailing list