[seam-commits] Seam SVN: r11829 - sandbox/trunk/modules/scheduling/src/test/java/org/jboss/seam/scheduling.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Dec 15 07:26:12 EST 2009


Author: peteroyle
Date: 2009-12-15 07:26:12 -0500 (Tue, 15 Dec 2009)
New Revision: 11829

Removed:
   sandbox/trunk/modules/scheduling/src/test/java/org/jboss/seam/scheduling/AbstractCDITest1.java
Log:
Removed

Deleted: sandbox/trunk/modules/scheduling/src/test/java/org/jboss/seam/scheduling/AbstractCDITest1.java
===================================================================
--- sandbox/trunk/modules/scheduling/src/test/java/org/jboss/seam/scheduling/AbstractCDITest1.java	2009-12-15 11:50:16 UTC (rev 11828)
+++ sandbox/trunk/modules/scheduling/src/test/java/org/jboss/seam/scheduling/AbstractCDITest1.java	2009-12-15 12:26:12 UTC (rev 11829)
@@ -1,95 +0,0 @@
-/**
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.seam.scheduling;
-
-import org.jboss.seam.scheduling.quartz.QuartzStarter;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import javax.enterprise.inject.spi.BeanManager;
-import javax.enterprise.util.AnnotationLiteral;
-import org.jboss.weld.environment.se.StartMain;
-import org.jboss.weld.environment.se.events.Shutdown;
-import org.jboss.weld.mock.MockServletLifecycle;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-
-/**
- *
- * @author pete
- */
-public abstract class AbstractCDITest1
-{
-
-    MockServletLifecycle lifecycle;
-    BeanManager manager;
-
-    public AbstractCDITest1()
-    {
-    }
-
-    @AfterClass(alwaysRun = true)
-    public void afterClass() throws Exception
-    {
-              shutdownManager(manager);
-
-    }
-
-    @BeforeClass
-    public void beforeClass() throws Throwable
-    {
-        manager = new StartMain(new String[] {}).go();
-
-//           lifecycle = new MockServletLifecycle();
-//        lifecycle.initialize();
-//        MockDeployment deployment = (MockDeployment)lifecycle.getDeployment();
-//        final List<Class<? extends Object>> allBeansList = new ArrayList<Class<? extends Object>>(getDefaultWebBeans());
-//        allBeansList.addAll(getAdditionalWebBeans());
-//        deployment.getArchive().setBeanClasses(allBeansList);
-//        lifecycle.beginApplication();
-//        lifecycle.beginSession();
-//        lifecycle.beginRequest();
-//        manager = CurrentManager.rootManager();
-    }
-
-    public List<Class<? extends Object>> getDefaultWebBeans()
-    {
-        return Arrays.asList(TestBean.class, AnotherTestBean.class, QuartzStarter.class);
-    }
-
-    /**
-     * Override in your tests to register specific beans with the manager.
-     * @return
-     */
-    public List<Class<? extends Object>> getAdditionalWebBeans()
-    {
-        return Collections.EMPTY_LIST;
-    }
-
-    private void shutdownManager(BeanManager manager)
-   {
-      manager.fireEvent(manager, new ShutdownAnnotation());
-   }
-
-   private static class ShutdownAnnotation extends AnnotationLiteral<Shutdown>
-   {
-
-      public ShutdownAnnotation()
-      {
-      }
-   }
-}



More information about the seam-commits mailing list