Package junit.framework

Examples of junit.framework.Test


   {
      TestSuite suite = new TestSuite();
      suite.addTest(new TestSuite(WebIntegrationUnitTestCase.class));

      // Create an initializer for the test suite
      Test wrapper = new JBossTestSetup(suite)
      {
         protected void setUp() throws Exception
         {
            super.setUp();
            JMSDestinationsUtil.setupBasicDestinations();
View Full Code Here


      assertEquals(map, test.getResourceAdapterNames());
   }
  
   public static Test suite() throws Exception
   {
      Test t = getDeploySetup(MDBDefaultRANameUnitTestCase.class, "mdbdefaultraname.jar");
      t = getDeploySetup(t, "jcainflow.rar");
      return t;
   }
View Full Code Here

    props.setProperty("test.webdav.uri",
        "webdav://vfsusr:vfs%2f%25\\te:st@10.0.1.54/vfstest");
    props.setProperty("test.sftp.uri",
        "sftp://vfsusr:vfs%2f%25\\te:st@10.0.1.54/vfstest");

    Test tests[] = new Test[]
    {
    // SmbProviderTestCase.suite(),

    // LocalProviderTestCase.suite(),
    // FtpProviderTestCase.suite(),

    // UrlProviderHttpTestCase.suite(),

    // VirtualProviderTestCase.suite(),
    // TemporaryProviderTestCase.suite(),
    // UrlProviderTestCase.suite(),
    // ResourceProviderTestCase.suite(),

    // HttpProviderTestCase.suite(),

    // WebdavProviderTestCase.suite(),

    SftpProviderTestCase.suite(),

    // JarProviderTestCase.suite(),
    // NestedJarTestCase.suite(),
    // ZipProviderTestCase.suite(),
    // NestedZipTestCase.suite(),
    // TarProviderTestCase.suite(),
    // TgzProviderTestCase.suite(),
    // Tbz2ProviderTestCase.suite(),
    // NestedTarTestCase.suite(),
    // NestedTgzTestCase.suite(),
    // NestedTbz2TestCase.suite(),
    };

    TestResult result = new TestResult()
    {
      public void startTest(Test test)
      {
        System.out.println("start " + test);
        System.out.flush();
      }

      public void endTest(Test test)
      {
        // System.err.println("end " + test);
      }

      public synchronized void addError(Test test, Throwable throwable)
      {
        // throw new RuntimeException(throwable.getMessage());
        throwable.printStackTrace();
      }

      public synchronized void addFailure(Test test,
          AssertionFailedError assertionFailedError)
      {
        // throw new RuntimeException(assertionFailedError.getMessage());
        assertionFailedError.printStackTrace();
      }
    };

    for (int i = 0; i < tests.length; i++)
    {
      System.out.println("start test#" + i);
      System.out.flush();

      Test test = tests[i];
      test.run(result);

      // break;
    }
  }
View Full Code Here

        // Configure the tests
        final Enumeration tests = testSuite.tests();
        while (tests.hasMoreElements())
        {
            final Test test = (Test) tests.nextElement();
            if (test instanceof AbstractProviderTestCase)
            {
                final AbstractProviderTestCase providerTestCase = (AbstractProviderTestCase) test;
                providerTestCase.setConfig(manager, baseFolder, readFolder, writeFolder);
            }
View Full Code Here

    /**
     * Create a suite of tests, run only in embedded since
     * this is testing server-side behaviour.
     **/
    public static Test suite() {
        Test suite = TestConfiguration.embeddedSuite(CoalesceTest.class);
       
        return new CleanDatabaseTestSetup(suite)
        {
            protected void decorateSQL(Statement stmt) throws SQLException
            {
View Full Code Here

    {
        if (JDBC.vmSupportsJSR169())
            return new TestSuite("GrantRevokeDDLTest"); // return empty suite;
                //test uses triggers and procedures that use DriverManager.
        TestSuite suite = new TestSuite(GrantRevokeDDLTest.class, "GrantRevokeDDL Test");
      Test test = new SupportFilesSetup(suite);
      test = new CleanDatabaseTestSetup(test);
      test = DatabasePropertyTestSetup.builtinAuthentication(
        test, users, "grantrevokeddl");
        test = TestConfiguration.sqlAuthorizationDecorator(test);
       
View Full Code Here

        // Need atleast JSR169 to run these tests
        if (!JDBC.vmSupportsJSR169() && !JDBC.vmSupportsJDBC3()) {
            return suite;
        }

        Test cleanTest = new CleanDatabaseTestSetup(suite);
        Test authenticatedTest = DatabasePropertyTestSetup.builtinAuthentication
                (cleanTest, LEGAL_USERS, "sequence");
        Test authorizedTest = TestConfiguration.sqlAuthorizationDecorator(authenticatedTest);

        return authorizedTest;
    }
View Full Code Here

                     * first here.
                     *
                     */

                    Class<?> clazz = Class.forName(name);
                    Test t = null;
                    try {
                        Method m = clazz.getMethod("suite", new Class[0]);
                        t = (Test) m.invoke(clazz, (Object[])null);
                        suites++;
                    } catch (NoSuchMethodException e) {
View Full Code Here

    public TruncateTableTest(String name) {
        super(name);
    }

    public static Test suite() {
        Test cleanTest = TestConfiguration.defaultSuite(TruncateTableTest.class);
        Test        authenticatedTest = DatabasePropertyTestSetup.builtinAuthentication
            ( cleanTest, LEGAL_USERS, "" );
        Test        authorizedTest = TestConfiguration.sqlAuthorizationDecorator( authenticatedTest );

        return authorizedTest;
    }
View Full Code Here

    public static void main(String[] args) {
        TestRunner runner = new TestRunner();

        try {
            for (int i=0; i<50000; i++) {
                Test test = new JUnit4TestAdapter(MdcInjectionFilterTest.class);
                runner.doRun(test);
                System.out.println("i = " + i + " " + new Date());
            }
            System.out.println("done");
        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of junit.framework.Test

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.