/**
   * Test suite for this test class.
   *
   * <p>
   *
   * @return the test suite
   */
  public static Test suite() {

    OpenCmsTestProperties.initialize(org.opencms.test.AllTests.TEST_PROPERTIES_PATH);

    TestSuite suite = new TestSuite();
    suite.setName(TestCmsSearchSpecialFeatures.class.getName());

    suite.addTest(new TestCmsSearchSpecialFeatures("testSearchIndexSetup"));
    suite.addTest(new TestCmsSearchSpecialFeatures("testIncrementalIndexUpdate"));
    suite.addTest(new TestCmsSearchSpecialFeatures("testLazyContentFields"));

    TestSetup wrapper =
        new TestSetup(suite) {

          @Override
          protected void setUp() {

            setupOpenCms("simpletest", "/");
          }

          @Override
          protected void tearDown() {

            removeOpenCms();
          }
        };

    return wrapper;
  }
 public static Test suite() throws Exception {
   TestSuite suite = new TestSuite();
   suite.addTest(ResourcesTestSuite.suite());
   suite.addTest(CalendarTestSuite.suite());
   suite.addTest(TableTestSuite.suite());
   return suite;
 }
Ejemplo n.º 3
0
  /** @return */
  public static TestSuite suite() {
    TestSuite suite = new TestSuite(MboxTagsTermIntegrationTest.class.getSimpleName());

    Properties p = new Properties();
    p.setProperty(MboxConnector.KEY_METADATA_STRATEGY, MetadataStrategy.YAML.toString());

    File[] samples =
        new File("etc/samples/mailboxes")
            .listFiles((FileFilter) new NotFileFilter(DirectoryFileFilter.INSTANCE));
    // File[] samples = new File[] {new File("etc/samples/mailboxes/samples.mbx")};

    for (int i = 0; i < samples.length; i++) {
      //            log.info("Sample [" + samples[i] + "]");
      suite.addTest(
          new TagsTermTest(
              "testTagMessage",
              new MboxStoreLifecycle("testTagMessage", p, samples[i]),
              null,
              null));
      suite.addTest(
          new TagsTermTest(
              "testXStreamTagTerm",
              new MboxStoreLifecycle("testXStreamTagTerm", p, samples[i]),
              null,
              null));
    }
    return suite;
  }
Ejemplo n.º 4
0
  public Test suite(final Map map) {
    project =
        ResourcesPlugin.getWorkspace()
            .getRoot()
            .getProject(map.get(ProjectSuite.PROJECT).toString());
    perfMonitor = PHPCorePerformanceTests.getPerformanceMonitor();
    TestSuite suite = new TestSuite("Auto Code Assist Tests");

    final PHPVersion phpVersion = (PHPVersion) map.get(ProjectSuite.PHP_VERSION);
    for (String testsDirectory : TESTS.get(phpVersion)) {
      testsDirectory =
          testsDirectory.replaceAll("project", map.get(ProjectSuite.PROJECT).toString());
      for (final String fileName :
          getPDTTFiles(testsDirectory, PHPCorePerformanceTests.getDefault().getBundle())) {
        try {
          final CodeAssistPdttFile pdttFile =
              new CodeAssistPdttFile(PHPCorePerformanceTests.getDefault().getBundle(), fileName);
          CodeAssistTests test =
              new CodeAssistTests(fileName) {

                protected void setUp() throws Exception {}

                protected void tearDown() throws Exception {
                  if (testFile != null) {
                    testFile.delete(true, null);
                    testFile = null;
                  }
                }

                protected void runTest() throws Throwable {
                  perfMonitor.execute(
                      "PerformanceTests.testCodeAssist" + "_" + fileName,
                      new Operation() {
                        public void run() throws Exception {
                          CompletionProposal[] proposals = getProposals(pdttFile.getFile());
                        }
                      },
                      1,
                      10);
                }
              };
          suite.addTest(test);
        } catch (final Exception e) {
          suite.addTest(
              new TestCase(fileName) { // dummy
                // test
                // indicating
                // PDTT
                // file
                // parsing
                // failure
                protected void runTest() throws Throwable {
                  throw e;
                }
              });
        }
      }
    }
    return suite;
  }
Ejemplo n.º 5
0
 public static Test suite() {
   TestSuite suite = new TestSuite("Setup/Teardown Lifecycle Tests");
   suite.addTest(OneTimeTeardownTest.suite());
   suite.addTest(OneTimeSetupTest.suite());
   suite.addTestSuite(TestClassManagerTest.class);
   return suite;
 }
 /** Add tests for the unconnected method to the overall test suite. */
 private void addTestSuiteFor$TestUnconnected(junit.framework.TestSuite overallTestSuite$) {
   junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("unconnected");
   try {
     org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter =
         new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator(
             this.vorg_jmlspecs_samples_digraph_SearchableDigraphIter("unconnected", 1));
     this.check_has_data(
         receivers$iter,
         "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_digraph_SearchableDigraphIter(\"unconnected\", 1))");
     while (!receivers$iter.atEnd()) {
       org.jmlspecs.jmlunit.strategies.IndefiniteIterator
           vorg_jmlspecs_samples_digraph_NodeType$1$iter =
               this.vorg_jmlspecs_samples_digraph_NodeTypeIter("unconnected", 0);
       this.check_has_data(
           vorg_jmlspecs_samples_digraph_NodeType$1$iter,
           "this.vorg_jmlspecs_samples_digraph_NodeTypeIter(\"unconnected\", 0)");
       while (!vorg_jmlspecs_samples_digraph_NodeType$1$iter.atEnd()) {
         final org.jmlspecs.samples.digraph.SearchableDigraph receiver$ =
             (org.jmlspecs.samples.digraph.SearchableDigraph) receivers$iter.get();
         final org.jmlspecs.samples.digraph.NodeType arg1 =
             (org.jmlspecs.samples.digraph.NodeType)
                 vorg_jmlspecs_samples_digraph_NodeType$1$iter.get();
         methodTests$.addTest(new TestUnconnected(receiver$, arg1));
         vorg_jmlspecs_samples_digraph_NodeType$1$iter.advance();
       }
       receivers$iter.advance();
     }
   } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) {
     // methodTests$ doesn't want more tests
   }
   overallTestSuite$.addTest(methodTests$);
 }
Ejemplo n.º 7
0
 public static Test suite() {
   TestSuite suite = new TestSuite("org.eclipse.wb.android");
   // suite.addTest(createSingleSuite(TestProjectTest.class));
   suite.addTest(ModelTests.suite());
   suite.addTest(GefTests.suite());
   return suite;
 }
 // @ requires overallTestSuite$ != null;
 public void addTestSuiteForEachMethod(junit.framework.TestSuite overallTestSuite$) {
   try {
     this.addTestSuiteFor$TestAtEnd(overallTestSuite$);
   } catch (java.lang.Throwable ex) {
     overallTestSuite$.addTest(new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex));
   }
   try {
     this.addTestSuiteFor$TestGet(overallTestSuite$);
   } catch (java.lang.Throwable ex) {
     overallTestSuite$.addTest(new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex));
   }
   try {
     this.addTestSuiteFor$TestAdvance(overallTestSuite$);
   } catch (java.lang.Throwable ex) {
     overallTestSuite$.addTest(new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex));
   }
   try {
     this.addTestSuiteFor$TestClone(overallTestSuite$);
   } catch (java.lang.Throwable ex) {
     overallTestSuite$.addTest(new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex));
   }
   try {
     this.addTestSuiteFor$TestToString(overallTestSuite$);
   } catch (java.lang.Throwable ex) {
     overallTestSuite$.addTest(new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex));
   }
 }
Ejemplo n.º 9
0
  /*===================================================================
    Public static methods
  ===================================================================*/
  public static TestSuite suite() {
    TestSuite result = new TestSuite();

    for (int i = 0; i < TESTS.length; i++) {
      if (TESTS[i].length == 3) {
        result.addTest(
            new OperatorTest((String) TESTS[i][1], TESTS[i][0], (String) TESTS[i][1], TESTS[i][2]));
      } else {
        if (TESTS[i].length == 4) {
          result.addTest(
              new OperatorTest(
                  (String) TESTS[i][1],
                  TESTS[i][0],
                  (String) TESTS[i][1],
                  TESTS[i][2],
                  TESTS[i][3]));
        } else {
          if (TESTS[i].length == 5) {
            result.addTest(
                new OperatorTest(
                    (String) TESTS[i][1],
                    TESTS[i][0],
                    (String) TESTS[i][1],
                    TESTS[i][2],
                    TESTS[i][3],
                    TESTS[i][4]));
          } else {
            throw new RuntimeException("don't understand TEST format");
          }
        }
      }
    }
    return result;
  }
Ejemplo n.º 10
0
 public static Test suite() {
   TestSuite suite =
       new TestSuite("All performance tests") {
         @Override
         public void runTest(Test test, TestResult result) {
           String msg = MessageFormat.format("Running test: {0}", test.toString());
           IdeLog.logError(Activator.getDefault(), msg);
           System.out.println(msg);
           super.runTest(test, result);
         }
       };
   // $JUnit-BEGIN$
   suite.addTest(com.aptana.studio.tests.startup.AllTests.suite());
   suite.addTest(com.aptana.scripting.tests.PerformanceTests.suite());
   suite.addTest(com.aptana.editor.coffee.tests.PerformanceTests.suite());
   suite.addTest(com.aptana.editor.common.tests.PerformanceTests.suite());
   suite.addTest(com.aptana.editor.css.tests.PerformanceTests.suite());
   suite.addTest(com.aptana.editor.html.tests.PerformanceTests.suite());
   suite.addTest(com.aptana.editor.js.tests.PerformanceTests.suite());
   suite.addTest(com.aptana.editor.json.tests.PerformanceTests.suite());
   suite.addTest(com.aptana.editor.xml.tests.PerformanceTests.suite());
   suite.addTest(com.aptana.git.core.tests.PerformanceTests.suite());
   suite.addTest(com.aptana.theme.tests.PerformanceTests.suite());
   // $JUnit-END$
   return suite;
 }
 public static Test suite() {
   TestSuite suite = new TestSuite();
   suite.addTest(PascalSuite.suite());
   suite.addTest(CommonSuite.suite());
   for (Test t : findClasses(CLASS_PATH)) suite.addTest(t);
   return suite;
 }
Ejemplo n.º 12
0
  public static Test suite() {
    TestSuite testSuite = new TestSuite(JavadocTest.class.getName());

    // Reset forgotten subsets of tests
    TestCase.TESTS_PREFIX = null;
    TestCase.TESTS_NAMES = null;
    TestCase.TESTS_NUMBERS = null;
    TestCase.TESTS_RANGE = null;
    TestCase.RUN_ONLY_ID = null;

    for (int i = 0, size = ALL_CLASSES.size(); i < size; i++) {
      Class testClass = (Class) ALL_CLASSES.get(i);
      Test suite = buildAllCompliancesTestSuite(testClass);
      testSuite.addTest(suite);
    }
    int complianceLevels = AbstractCompilerTest.getPossibleComplianceLevels();
    if ((complianceLevels & AbstractCompilerTest.F_1_3) != 0) {
      testSuite.addTest(
          buildUniqueComplianceTestSuite(JavadocTest_1_3.class, ClassFileConstants.JDK1_3));
    }
    if ((complianceLevels & AbstractCompilerTest.F_1_4) != 0) {
      testSuite.addTest(
          buildUniqueComplianceTestSuite(JavadocTest_1_4.class, ClassFileConstants.JDK1_4));
    }
    if ((complianceLevels & AbstractCompilerTest.F_1_5) != 0) {
      testSuite.addTest(
          buildUniqueComplianceTestSuite(JavadocTest_1_5.class, ClassFileConstants.JDK1_5));
    }
    return testSuite;
  }
  public static Test suite() {
    TestSuite suite = new TestSuite(TestExcelConverterSuite.class.getName());

    File directory = POIDataSamples.getSpreadSheetInstance().getFile("../spreadsheet");
    for (final File child :
        directory.listFiles(
            new FilenameFilter() {
              public boolean accept(File dir, String name) {
                return name.endsWith(".xls") && !failingFiles.contains(name);
              }
            })) {
      final String name = child.getName();
      suite.addTest(
          new TestCase(name + " [FO]") {
            public void runTest() throws Exception {
              testFo(child);
            }
          });
      suite.addTest(
          new TestCase(name + " [HTML]") {
            public void runTest() throws Exception {
              testHtml(child);
            }
          });
    }

    return suite;
  }
Ejemplo n.º 14
0
 public static Test suite() {
   TestSuite suite = new TestSuite("RemoveCommandTest");
   suite.addTest(new RemoveCommandTest("testRemoveSameValue"));
   suite.addTest(new RemoveCommandTest("testRemoveSameValues"));
   suite.addTest(new RemoveCommandTest("testRemoveEqualValues"));
   return suite;
 }
Ejemplo n.º 15
0
 /** Add tests for the replaceEntry method to the overall test suite. */
 private void addTestSuiteFor$TestReplaceEntry(junit.framework.TestSuite overallTestSuite$) {
   junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("replaceEntry");
   try {
     org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter =
         new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator(
             this.vorg_jmlspecs_samples_list_list3_E_OneWayListIter("replaceEntry", 1));
     this.check_has_data(
         receivers$iter,
         "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list3_E_OneWayListIter(\"replaceEntry\", 1))");
     while (!receivers$iter.atEnd()) {
       org.jmlspecs.jmlunit.strategies.IndefiniteIterator vjava_lang_Object$1$iter =
           this.vjava_lang_ObjectIter("replaceEntry", 0);
       this.check_has_data(
           vjava_lang_Object$1$iter, "this.vjava_lang_ObjectIter(\"replaceEntry\", 0)");
       while (!vjava_lang_Object$1$iter.atEnd()) {
         final org.jmlspecs.samples.list.list3.E_OneWayList receiver$ =
             (org.jmlspecs.samples.list.list3.E_OneWayList) receivers$iter.get();
         final java.lang.Object arg1 = (java.lang.Object) vjava_lang_Object$1$iter.get();
         methodTests$.addTest(new TestReplaceEntry(receiver$, arg1));
         vjava_lang_Object$1$iter.advance();
       }
       receivers$iter.advance();
     }
   } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) {
     // methodTests$ doesn't want more tests
   }
   overallTestSuite$.addTest(methodTests$);
 }
Ejemplo n.º 16
0
  public static Test suite() {
    TestSuite suite = new TestSuite("SrcGenTests");
    suite.addTest(new TestSuite(TestNewClassGen.class));
    suite.addTest(new TestSuite(TestMethodGenerator.class));

    return suite;
  }
Ejemplo n.º 17
0
  public static Test suite() {
    TestSuite testSuite = new TestSuite();

    testSuite.addTest(PollsQuestionTests.suite());
    testSuite.addTest(PollsVoteTests.suite());

    return testSuite;
  }
  public static Test suite() {
    TestSuite testSuite = new TestSuite();

    testSuite.addTest(PortletTests.suite());
    testSuite.addTest(UnitTests.suite());

    return testSuite;
  }
Ejemplo n.º 19
0
  public static Test suite() {
    TestSuite testSuite = new TestSuite();

    testSuite.addTest(AddVocabularyAssetTypeMultipleTests.suite());
    testSuite.addTest(DeleteVocabularyAssetType2Tests.suite());

    return testSuite;
  }
Ejemplo n.º 20
0
  public static Test suite() {
    TestSuite testSuite = new TestSuite();

    testSuite.addTest(MBBanTests.suite());
    testSuite.addTest(SubscriptionTests.suite());

    return testSuite;
  }
Ejemplo n.º 21
0
 /** @return */
 public static TestSuite suite() {
   TestSuite suite = new TestSuite();
   LocationType type = new LocationType("value");
   suite.addTest(new LocationTypeTest(type, "value"));
   suite.addTest(new LocationTypeTest("testValidation", type));
   suite.addTest(new LocationTypeTest("testEquals", type));
   return suite;
 }
Ejemplo n.º 22
0
 static Test suite(String url) {
   TestSuite suite = new TestSuite();
   suite.addTest(new StoreTest("testConnect", url));
   suite.addTest(new StoreTest("testClose", url));
   suite.addTest(new StoreTest("testGetDefaultFolder", url));
   suite.addTest(new StoreTest("testGetFolder", url));
   return suite;
 }
  public static Test suite() {
    TestSuite suite = new TestSuite(ClassTools.packageNameFor(AllFrameworkResourcesTests.class));

    suite.addTest(IconRepositoryTests.suite());
    suite.addTest(StringRepositoryTests.suite());

    return suite;
  }
Ejemplo n.º 24
0
 /** @return */
 public static TestSuite suite() {
   TestSuite suite = new TestSuite();
   suite.addTest(new VersionTest(Version.VERSION_2_0, "2.0"));
   suite.addTest(new VersionTest("testImmutable", Version.VERSION_2_0));
   suite.addTest(new VersionTest("testValidation", Version.VERSION_2_0));
   suite.addTest(new VersionTest("testEquals", Version.VERSION_2_0));
   return suite;
 }
Ejemplo n.º 25
0
  public static Test suite() {
    TestSuite suite = new TestSuite();

    suite.addTest(TocVegNormFactorLoaderTest.suite());
    suite.addTest(TocVegInputStatisticsLoaderTest.suite());
    suite.addTest(TocVegOutputStatisticsLoaderTest.suite());
    return suite;
  }
Ejemplo n.º 26
0
  public static Test suite() throws Exception {
    TestSuite suite = new TestSuite("All org.castor.jdo tests");

    suite.addTest(org.castor.jdo.drivers.TestAll.suite());
    suite.addTest(org.castor.jdo.engine.TestAll.suite());

    return suite;
  }
Ejemplo n.º 27
0
 public static Test suite() {
   TestSuite suite = new TestSuite();
   suite.addTest(new VendorEntityTest("testCreateVendor"));
   suite.addTest(new VendorEntityTest("testModifyVendor"));
   suite.addTest(new VendorEntityTest("testSelectVendor"));
   // suite.addTest(new VendorEntityTest("testDeleteVendor"));
   return suite;
 }
Ejemplo n.º 28
0
  // test suite from all defined tests
  public static Test suite() {
    TestSuite suite = new TestSuite("jmri.server"); // no tests in this class itself

    suite.addTest(BundleTest.suite());
    suite.addTest(jmri.server.json.PackageTest.suite());

    return suite;
  }
Ejemplo n.º 29
0
  public static Test suite() {
    TestSuite testSuite = new TestSuite();

    testSuite.addTest(WebContentTests.suite());
    testSuite.addTest(WebFormTests.suite());

    return testSuite;
  }
Ejemplo n.º 30
0
 public static Test suite() {
   TestSuite suite = new TestSuite(AllTests.class.getName());
   // $JUnit-BEGIN$
   suite.addTest(CoreTests.suite());
   suite.addTest(UITests.suite());
   // $JUnit-END$
   return suite;
 }