Package junit.extensions

Examples of junit.extensions.TestSetup


        tearDown();
        setUpHowlLog();
    }

    public static Test suite() {
        return new TestSetup(new TestSuite(HOWLLogRecoveryTest.class)) {
            protected void setUp() throws Exception {
                File logFile = new File(txlogDir, LOG_FILE_NAME + "_1.log");
                if (logFile.exists()) {
                    logFile.delete();
                }
View Full Code Here


        defaultParentId.addDependency(new Artifact("geronimo", "test", "1", "car"), ImportType.ALL);
    }

    public static Test suite() throws Exception {
        TestSuite inner = new TestSuite(EARConfigBuilderTest.class);
        TestSetup setup14 = new TestSetup(inner) {
            protected void setUp() throws Exception {
                earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-ear14/test-ear.ear"));
                ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar", null, null, null);
                webConfigBuilder.contextRoot = contextRoot;
                webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
                connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "test-rar.rar", null, null, null);
            }

            protected void tearDown() {
                DeploymentUtil.close(earFile);
                close(ejbConfigBuilder.ejbModule);
                close(webConfigBuilder.webModule);
                close(connectorConfigBuilder.connectorModule);
            }
        };
        TestSetup setupNaked14 = new TestSetup(inner) {
            protected void setUp() throws Exception {
                earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-ear14/test-naked-ear.ear"));
                ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar", null, null, null);
                webConfigBuilder.contextRoot = contextRoot;
                webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
                connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "test-rar.rar", null, null, null);
            }

            protected void tearDown() {
                DeploymentUtil.close(earFile);
                close(ejbConfigBuilder.ejbModule);
                close(webConfigBuilder.webModule);
                close(connectorConfigBuilder.connectorModule);
            }
        };
        TestSetup setup13 = new TestSetup(inner) {
            protected void setUp() throws Exception {
                earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-ear13/test-ear.ear"));
                ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar", null, null, null);
                webConfigBuilder.contextRoot = contextRoot;
                webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
                connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "test-rar.rar", null, null, null);
            }

            protected void tearDown() {
                DeploymentUtil.close(earFile);
                close(ejbConfigBuilder.ejbModule);
                close(webConfigBuilder.webModule);
                close(connectorConfigBuilder.connectorModule);
            }
        };
        TestSetup setupNaked13 = new TestSetup(inner) {
            protected void setUp() throws Exception {
                earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-ear13/test-naked-ear.ear"));
                ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar", null, null, null);
                webConfigBuilder.contextRoot = contextRoot;
                webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
                connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "test-rar.rar", null, null, null);
            }

            protected void tearDown() {
                DeploymentUtil.close(earFile);
                close(ejbConfigBuilder.ejbModule);
                close(webConfigBuilder.webModule);
                close(connectorConfigBuilder.connectorModule);
            }
        };
        TestSetup setupUnpacked = new TestSetup(inner) {
            protected void setUp() throws Exception {
                earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-unpacked-ear/full/"));
                ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar/", null, null, null);
                webConfigBuilder.contextRoot = contextRoot;
                webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "test-war.war/", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
                connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "test-rar.rar", null, null, null);
            }

            protected void tearDown() {
                DeploymentUtil.close(earFile);
                close(ejbConfigBuilder.ejbModule);
                close(webConfigBuilder.webModule);
                close(connectorConfigBuilder.connectorModule);
            }
        };
        TestSetup setupUnpackedNaked = new TestSetup(inner) {
            protected void setUp() throws Exception {
                earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-unpacked-ear/naked/"));
                ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar/", null, null, null);
                webConfigBuilder.contextRoot = contextRoot;
                webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
                connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "test-rar.rar", null, null, null);
            }

            protected void tearDown() {
                DeploymentUtil.close(earFile);
                close(ejbConfigBuilder.ejbModule);
                close(webConfigBuilder.webModule);
                close(connectorConfigBuilder.connectorModule);
            }
        };
        TestSetup setupUnpackedAltDD = new TestSetup(inner) {
            protected void setUp() throws Exception {
                earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-unpacked-ear/alt-dd/"));
                ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar/", null, null, null);
                webConfigBuilder.contextRoot = contextRoot;
                webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "test-war.war/", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
                connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "test-rar.rar", null, null, null);
            }

            protected void tearDown() {
                DeploymentUtil.close(earFile);
                close(ejbConfigBuilder.ejbModule);
                close(webConfigBuilder.webModule);
                close(connectorConfigBuilder.connectorModule);
            }
        };
        TestSetup setupPackedAltDD = new TestSetup(inner) {
            protected void setUp() throws Exception {
                earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-unpacked-ear/alt-dd.ear"));
                ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar/", null, null, null);
                webConfigBuilder.contextRoot = contextRoot;
                webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "test-war.war/", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
View Full Code Here

    public static Test suite() throws Exception {
        TestSuite suite = new TestSuite();
        TestSuite inner = new TestSuite(GBeanTest.class);

        suite.addTest(new TestSetup(inner) {
            protected void setUp() throws Exception {
                super.setUp();
                kernelWraper = new KernelWraper();
            }
        });

        suite.addTest(new TestSetup(inner) {
            protected void setUp() throws Exception {
                super.setUp();
                kernelWraper = new GBeanKernelLifecycle();
            }
        });
View Full Code Here

    public static Test suite() throws Exception {
        TestSuite suite = new TestSuite();
        TestSuite inner = new TestSuite(GBeanTest.class);

        suite.addTest(new TestSetup(inner) {
            protected void setUp() throws Exception {
                super.setUp();
                kernelWraper = new KernelWraper();
            }
        });

        suite.addTest(new TestSetup(inner) {
            protected void setUp() throws Exception {
                super.setUp();
                kernelWraper = new GBeanKernelLifecycle();
            }
        });
View Full Code Here

           
            SURDataModelSetup.SURDataModel model =
                (SURDataModelSetup.SURDataModel) i.next();
           
            TestSuite suite = new TestSuite(SURTest.class);
            TestSetup decorator = new SURDataModelSetup
                (suite, model);
           
            mainSuite.addTest(decorator);   
        }
       
View Full Code Here

    testCalendar = Calendar.getInstance();
    testCalendar.setTime(testDate);
  }

  public static Test suite() {
    return new TestSetup(
        new TestSuite(NotesConnectorDocumentTest.class)) {
      @Override protected void setUp() throws Exception {
        supportsInheritedAcls =
            Boolean.getBoolean("javatest.supportsinheritedacls");
        connector = NotesConnectorTest.getConnector();
View Full Code Here

  private static NotesSession session;
  private static NotesDatabaseMock namesDatabase;
  private static NotesDatabaseMock testDb;

  public static Test suite() {
    return new TestSetup(
        new TestSuite(NotesAuthorizationManagerTest.class)) {
      @Override protected void setUp() throws Exception {
        connector = NotesConnectorTest.getConnector();
        factory = (SessionFactoryMock) connector.getSessionFactory();
        NotesConnectorSessionTest.configureFactoryForSession(factory);
View Full Code Here

  private static NotesConnectorSession connectorSession;
  private static List<Document> documents;

  public static Test suite() {
    if (Boolean.getBoolean("javatest.supportsinheritedacls")) {
      return new TestSetup(new TestSuite(InheritableAclTest.class)) {
        @Override protected void setUp() throws Exception {
          connector = ConnectorFixture.getConnector(false, true);
          connectorSession = (NotesConnectorSession) connector.login();
          NotesUserGroupManager userGroupManager =
              new NotesUserGroupManager(connectorSession);
View Full Code Here

  private static NotesDatabaseMock namesDatabase;
  private static final int groupCount = 8;
  private static final int userCount = 11;

  public static Test suite() {
    return new TestSetup(
        new TestSuite(NotesUserGroupManagerTest.class)) {
      @Override protected void setUp() throws Exception {
        connector = NotesConnectorTest.getConnector();
        factory = (SessionFactoryMock) connector.getSessionFactory();
        NotesConnectorSessionTest.configureFactoryForSession(factory);
View Full Code Here

private static NotesDocumentMock hogwartsDatabaseDocument;
private static NotesUserGroupManager userGroupManager;
private static HashMap<String, User> users = new HashMap<String, User>();

  public static Test suite() {
    return new TestSetup(new TestSuite(
            NotesAuthorizationManagerWildcardsTest.class)) {
      @Override protected void setUp() throws Exception {
        connector = NotesConnectorTest.getConnector();
        factory = (SessionFactoryMock) connector.getSessionFactory();
        NotesConnectorSessionTest.configureFactoryForSession(factory);
View Full Code Here

TOP

Related Classes of junit.extensions.TestSetup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.