Java Code Examples for junit.framework.Test

The following code examples are extracted from open source projects. You can click to vote up the examples that are useful to you.

Example 1

From project apb, under directory /modules/apb/src/apb/testrunner/.

Source file: JUnit3TestSet.java

  18 
vote

/** 
 * This is an ugly hack to filter-out useless TestSuites
 */
private static boolean isValidSuite(TestSuite testSuite){
  final int testCount=testSuite.testCount();
  if (testCount != 1) {
    return testCount > 1;
  }
  final Test test=testSuite.testAt(0);
  if (!(test instanceof TestCase)) {
    return true;
  }
  final TestCase testCase=(TestCase)test;
  return !"warning".equals(testCase.getName()) || !testCase.getClass().getName().startsWith("junit.framework.");
}
 

Example 2

From project activemq-apollo, under directory /apollo-itests/src/test/java/org/apache/activemq/apollo/.

Source file: CombinationTestSupport.java

  17 
vote

public static Test suite(Class<? extends CombinationTestSupport> clazz){
  TestSuite suite=new TestSuite();
  ArrayList<String> names=new ArrayList<String>();
  Method[] methods=clazz.getMethods();
  for (int i=0; i < methods.length; i++) {
    String name=methods[i].getName();
    if (names.contains(name) || !isPublicTestMethod(methods[i])) {
      continue;
    }
    names.add(name);
    Test test=TestSuite.createTest(clazz,name);
    if (test instanceof CombinationTestSupport) {
      CombinationTestSupport[] combinations=((CombinationTestSupport)test).getCombinations();
      for (int j=0; j < combinations.length; j++) {
        suite.addTest(combinations[j]);
      }
    }
 else {
      suite.addTest(test);
    }
  }
  return suite;
}
 

Example 3

From project commons-compress, under directory /src/test/java/org/apache/commons/compress/.

Source file: ArchiveReadTests.java

  17 
vote

public static TestSuite suite() throws IOException {
  TestSuite suite=new TestSuite("ArchiveReadTests");
  File arcdir=new File(classLoader.getResource("archives").getFile());
  assertTrue(arcdir.exists());
  File listing=new File(arcdir,"files.txt");
  assertTrue("files.txt is readable",listing.canRead());
  BufferedReader br=new BufferedReader(new FileReader(listing));
  String line;
  while ((line=br.readLine()) != null) {
    if (line.startsWith("#")) {
      continue;
    }
    fileList.add(line);
  }
  br.close();
  File[] files=arcdir.listFiles();
  for (  final File file : files) {
    if (file.getName().endsWith(".txt")) {
      continue;
    }
    TestSuite namedSuite=new TestSuite(file.getName());
    Test test=new ArchiveReadTests("testArchive",file);
    namedSuite.addTest(test);
    suite.addTest(namedSuite);
  }
  return suite;
}
 

Example 4

From project eclipse.platform.runtime, under directory /tests/org.eclipse.core.tests.harness/src/org/eclipse/core/tests/harness/.

Source file: EclipseTestHarnessApplication.java

  17 
vote

protected Object run(String testName) throws Exception {
  Object testObject=findTestFor(testName);
  if (testObject == null)   return null;
  Class testClass=testObject.getClass();
  Method method=testClass.getDeclaredMethod("suite",new Class[0]);
  Test suite=null;
  try {
    suite=(Test)method.invoke(testClass,new Object[0]);
  }
 catch (  InvocationTargetException e) {
    if (e.getTargetException() instanceof Error)     throw (Error)e.getTargetException();
 else     throw e;
  }
  run(suite);
  return null;
}
 

Example 5

From project grails-gdoc-engine, under directory /src/test/java/org/radeox/.

Source file: PerformanceTests.java

  17 
vote

public static Test suite() throws IOException {
  File wikiTxt=new File("wiki.txt");
  BufferedReader reader=new BufferedReader(new FileReader(wikiTxt.getCanonicalFile()));
  StringBuffer input=new StringBuffer();
  String tmp;
  while ((tmp=reader.readLine()) != null) {
    input.append(tmp);
  }
  RenderEngine engine=new BaseRenderEngine();
  System.err.println(engine.render("__initialized__",new BaseRenderContext()));
  TestSuite s=new TestSuite();
  long maxElapsedTime=30 * 1000;
  StringBuffer testString=new StringBuffer();
  for (int i=0; i < 10; i++) {
    testString.append(input);
    Test renderEngineTest=new RenderEnginePerformanceTest(testString.toString());
    Test timedTest=new TimedTest(renderEngineTest,maxElapsedTime,false);
    s.addTest(timedTest);
  }
  return s;
}
 

Example 6

From project guice-jit-providers, under directory /core/test/com/google/inject/.

Source file: SuiteUtils.java

  17 
vote

public static TestSuite removeSuppressedTests(TestSuite suite,Set<String> suppressedTestNames){
  TestSuite result=new TestSuite(suite.getName());
  for (Enumeration e=suite.tests(); e.hasMoreElements(); ) {
    Test test=(Test)e.nextElement();
    if (suppressedTestNames.contains(test.toString())) {
      continue;
    }
    if (test instanceof TestSuite) {
      result.addTest(removeSuppressedTests((TestSuite)test,suppressedTestNames));
    }
 else {
      result.addTest(test);
    }
  }
  return result;
}
 

Example 7

From project hornetq-version-tests, under directory /src/test/java/org/hornetq/jms/.

Source file: JoramAggregationTest.java

  17 
vote

/** 
 * Create a dummy test renaming its content
 * @param test
 * @return
 */
private Test createDummyTest(Test test){
  Test dummyTest=(Test)hashTests.get(test);
  if (dummyTest == null) {
    if (test instanceof TestCase) {
      dummyTest=new DummyTestCase(this.getName() + ":" + ((TestCase)test).getName());
    }
 else     if (test instanceof TestSuite) {
      dummyTest=new DummyTestCase(this.getName() + ":" + ((TestCase)test).getName());
    }
 else {
      dummyTest=new DummyTestCase(test.getClass().getName());
    }
    hashTests.put(test,dummyTest);
  }
  return dummyTest;
}
 

Example 8

From project agraph-java-client, under directory /src/test/.

Source file: AGGraphMakerTest.java

  15 
vote

public static Test suite(){
  TestSuite suite=new TestSuite();
  suite.addTestSuite(AGGraphMakerTest.class);
  TestSetup wrapper=new TestSetup(suite){
    protected void setUp(){
      setUpOnce();
    }
    protected void tearDown(){
      tearDownOnce();
    }
  }
;
  return wrapper;
}
 

Example 9

From project android_packages_apps_Gallery, under directory /tests/src/com/android/camera/.

Source file: StressTests.java

  15 
vote

public static Test suite(){
  TestSuite result=new TestSuite();
  result.addTestSuite(SwitchPreview.class);
  result.addTestSuite(ImageCapture.class);
  result.addTestSuite(CameraLatency.class);
  result.addTestSuite(CameraStartUp.class);
  return result;
}
 

Example 10

From project aws-tasks, under directory /src/main/java/datameer/awstasks/ant/junit/.

Source file: EnhancedJunitFormatter.java

  15 
vote

/** 
 * Get test name
 * @param test a test
 * @return test name
 */
protected String getTestName(Test test){
  if (test == null) {
    return "null";
  }
 else {
    return JUnitVersionHelper.getTestCaseName(test);
  }
}
 

Example 11

From project aws-toolkit-for-eclipse, under directory /com.amazonaws.eclipse.datatools.enablement.simpledb.editor.test/src/com/amazonaws/eclipse/datatools/enablement/simpledb/editor/.

Source file: AllTests.java

  15 
vote

public static Test suite(){
  TestSuite suite=new TestSuite("Test for com.amazonaws.eclipse.datatools.enablement.simpledb");
  suite.addTestSuite(EditorTest.class);
  suite.addTestSuite(SDBDataAccessorTest.class);
  return suite;
}
 

Example 12

From project ballroom, under directory /widgets/src/test/java/org/jboss/ballroom/testsuites/.

Source file: BallRoomTestSuite.java

  15 
vote

public static Test suite(){
  TestSuite suite=new TestSuite();
  suite.addTestSuite(DefaultGroupRendererTest.class);
  suite.addTestSuite(FormTest.class);
  suite.addTestSuite(ListBoxItemTest.class);
  suite.addTestSuite(TextAreaItemTest.class);
  suite.addTestSuite(UnitBoxItemTest.class);
  return suite;
}
 

Example 13

From project beam-third-party, under directory /beam-meris-veg/src/test/java/org/esa/beam/processor/baer/auxdata/.

Source file: BaerAllTests.java

  15 
vote

public static Test suite(){
  TestSuite suite=new TestSuite();
  suite.addTest(RelAerPhaseLoaderTest.suite());
  suite.addTest(AerPhaseLoaderTest.suite());
  suite.addTest(NdviLoaderTest.suite());
  suite.addTest(GroundReflectanceLoaderTest.suite());
  suite.addTest(AerBandParamTest.suite());
  suite.addTest(AerLutTest.suite());
  suite.addTest(SoilFractionLoaderTest.suite());
  suite.addTest(F_TuningLoaderTest.suite());
  suite.addTest(SpectrumTest.suite());
  suite.addTest(AerDiffTransmLoaderTest.suite());
  suite.addTest(HemisphReflecLoaderTest.suite());
  return suite;
}
 

Example 14

From project beanstalker, under directory /beanstalk-maven-plugin/src/test/java/br/com/ingenieux/mojo/beanstalk/.

Source file: MinimalTestSuite.java

  15 
vote

public static Test suite(){
  TestSuite suite=new TestSuite(MinimalTestSuite.class.getName());
  suite.addTestSuite(CheckAvailabilityMojoTest.class);
  suite.addTestSuite(BootstrapTest.class);
  return suite;
}
 

Example 15

From project Cafe, under directory /testrunner/src/com/baidu/cafe/junitreport/.

Source file: JUnitReportListener.java

  15 
vote

@Override public void startTest(Test test){
  try {
    openIfRequired(test);
    if (test instanceof TestCase) {
      TestCase testCase=(TestCase)test;
      checkForNewSuite(testCase);
      mSerializer.startTag("",TAG_CASE);
      mSerializer.attribute("",ATTRIBUTE_CLASS,mCurrentSuite);
      mSerializer.attribute("",ATTRIBUTE_NAME,testCase.getName());
      mTimeAlreadyWritten=false;
      mTestStartTime=System.currentTimeMillis();
    }
  }
 catch (  IOException e) {
    Log.e(LOG_TAG,safeMessage(e));
  }
}
 

Example 16

From project cas, under directory /cas-server-compatibility/src/test/java/org/jasig/cas/login/.

Source file: AllTests.java

  15 
vote

public static Test suite(){
  TestSuite suite=new TestSuite("CAS 2 compatibility tests");
  suite.addTestSuite(ValidateCompatibilityTests.class);
  suite.addTestSuite(LoginAsCredentialsAcceptorCompatibilityTests.class);
  suite.addTestSuite(ProxyValidateCompatibilityTests.class);
  suite.addTestSuite(LogoutCompatibilityTests.class);
  suite.addTestSuite(LoginAsCredentialsRequestorCompatibilityTests.class);
  suite.addTestSuite(ServiceValidateCompatibilityTests.class);
  return suite;
}
 

Example 17

From project cascading, under directory /src/test/cascading/.

Source file: ComparePlatformsTest.java

  15 
vote

public static Test suite() throws Exception {
  String root=getTestRoot();
  File localRoot=new File(root + "/local");
  File hadoopRoot=new File(root + "/hadoop");
  LinkedList<File> localFiles=new LinkedList<File>(FileUtils.listFiles(localRoot,new RegexFileFilter("^[\\w-]+"),TrueFileFilter.INSTANCE));
  LinkedList<File> hadoopFiles=new LinkedList<File>();
  int rootLength=localRoot.toString().length() + 1;
  ListIterator<File> iterator=localFiles.listIterator();
  while (iterator.hasNext()) {
    File localFile=iterator.next();
    File file=new File(hadoopRoot,localFile.toString().substring(rootLength));
    if (localFile.toString().endsWith(NONDETERMINISTIC))     iterator.remove();
 else     if (file.exists())     hadoopFiles.add(file);
 else     iterator.remove();
  }
  LOG.info("running {} comparisons",localFiles.size());
  TestSuite suite=new TestSuite();
  for (int i=0; i < localFiles.size(); i++) {
    File localFile=localFiles.get(i);
    File hadoopFile=hadoopFiles.get(i);
    suite.addTest(new CompareTestCase(localFile,hadoopFile));
  }
  return suite;
}
 

Example 18

From project celltable-tools, under directory /src/test/java/com/colinalworth/celltable/columns/.

Source file: GWTColumnsCreatorSuite.java

  15 
vote

public static Test suite(){
  GWTTestSuite suite=new GWTTestSuite("ColumnCreator Tests");
  suite.addTestSuite(ColumnsTest.class);
  suite.addTestSuite(ColumnsWithFactoryTest.class);
  return suite;
}
 

Example 19

From project Cinch, under directory /test/com/palantir/ptoss/cinch/.

Source file: AllCinchTests.java

  15 
vote

public static Test suite(){
  TestSuite suite=new TestSuite("Palantir Cinch Tests");
  suite.addTestSuite(BindingsTest.class);
  suite.addTestSuite(BindingsSubclassTest.class);
  suite.addTestSuite(CantFindGetterSetterTest.class);
  suite.addTestSuite(WrongTypeTest.class);
  suite.addTestSuite(InaccessibleControllerMethodTest.class);
  suite.addTestSuite(AbstractBoundMethodTest.class);
  suite.addTestSuite(BindingContextIndexTest.class);
  suite.addTestSuite(BindingContextTest.class);
  suite.addTestSuite(EnabledIfTest.class);
  suite.addTestSuite(ActionTest.class);
  suite.addTestSuite(ViewSubclassModelNameCollisionTest.class);
  suite.addTestSuite(NotBindableTest.class);
  suite.addTestSuite(SubclassEdgeCasesTest.class);
  suite.addTestSuite(NegativeActionTest.class);
  suite.addTestSuite(CallOnUpdateTest.class);
  suite.addTestSuite(BoundJLabelTest.class);
  suite.addTestSuite(BoundJComboBoxTest.class);
  suite.addTestSuite(BoundJProgressBarTest.class);
  suite.addTestSuite(BoundJCheckBoxTest.class);
  suite.addTestSuite(BoundJCheckBoxMenuItemTest.class);
  suite.addTestSuite(BoundJToggleButtonTest.class);
  suite.addTestSuite(BoundJSliderTest.class);
  suite.addTestSuite(BoundJTextComponentTest.class);
  suite.addTestSuite(BoundJListTest.class);
  return suite;
}
 

Example 20

From project clutter, under directory /src/clutter/.

Source file: Suites.java

  15 
vote

private static Test makeSuite(Predicate<Class> predicate) throws ClassNotFoundException {
  TestSuite testSuite=new TestSuite();
  SimpleTestCollector testCollector=new SimpleTestCollector();
  Enumeration enumeration=testCollector.collectTests();
  while (enumeration.hasMoreElements()) {
    Class klass=Class.forName((String)enumeration.nextElement());
    if (predicate.apply(klass)) {
      testSuite.addTestSuite(klass);
    }
  }
  return testSuite;
}
 

Example 21

From project collections-generic, under directory /src/test/org/apache/commons/collections15/bag/.

Source file: TestAll.java

  15 
vote

public static Test suite(){
  TestSuite suite=new TestSuite();
  suite.addTest(TestHashBag.suite());
  suite.addTest(TestPredicatedBag.suite());
  suite.addTest(TestPredicatedSortedBag.suite());
  suite.addTest(TestTransformedBag.suite());
  suite.addTest(TestTransformedSortedBag.suite());
  suite.addTest(TestTreeBag.suite());
  suite.addTest(TestTypedBag.suite());
  suite.addTest(TestTypedSortedBag.suite());
  return suite;
}
 

Example 22

From project commons-logging, under directory /src/test/org/apache/commons/logging/.

Source file: AltHashtableTestCase.java

  15 
vote

public static Test suite() throws Exception {
  Class thisClass=AltHashtableTestCase.class;
  ClassLoader thisClassLoader=thisClass.getClassLoader();
  PathableClassLoader loader=new PathableClassLoader(null);
  loader.useExplicitLoader("junit.",thisClassLoader);
  loader.addLogicalLib("testclasses");
  loader.addLogicalLib("commons-logging");
  Class testClass=loader.loadClass(thisClass.getName());
  return new PathableTestSuite(testClass,loader);
}
 

Example 23

From project core_4, under directory /legacy-tests/src/test/java/org/ajax4jsf/framework/ajax/xmlfilter/.

Source file: AllTests.java

  15 
vote

public static Test suite(){
  TestSuite suite=new TestSuite("Test for org.ajax4jsf.webapp");
  suite.addTestSuite(CacheContentTest.class);
  suite.addTestSuite(NekkoParserTest.class);
  return suite;
}
 

Example 24

From project des, under directory /daemon/lib/apache-log4j-1.2.16/tests/src/java/org/apache/log4j/.

Source file: CoreTestSuite.java

  15 
vote

/** 
 * Constructs test suite.
 * @return test suite
 */
public static Test suite(){
  TestSuite s=new TestSuite();
  s.addTestSuite(LoggingEventTest.class);
  s.addTestSuite(org.apache.log4j.LevelTest.class);
  s.addTestSuite(org.apache.log4j.PriorityTest.class);
  s.addTestSuite(org.apache.log4j.CategoryTest.class);
  s.addTestSuite(org.apache.log4j.FileAppenderTest.class);
  s.addTestSuite(org.apache.log4j.LogManagerTest.class);
  s.addTestSuite(org.apache.log4j.helpers.LogLogTest.class);
  s.addTestSuite(org.apache.log4j.LayoutTest.class);
  s.addTestSuite(org.apache.log4j.helpers.DateLayoutTest.class);
  s.addTestSuite(org.apache.log4j.TTCCLayoutTest.class);
  s.addTestSuite(org.apache.log4j.xml.XMLLayoutTest.class);
  s.addTestSuite(org.apache.log4j.HTMLLayoutTest.class);
  s.addTestSuite(org.apache.log4j.PatternLayoutTest.class);
  s.addTestSuite(org.apache.log4j.spi.LoggingEventTest.class);
  s.addTestSuite(org.apache.log4j.spi.ThrowableInformationTest.class);
  s.addTestSuite(org.apache.log4j.spi.LocationInfoTest.class);
  s.addTestSuite(org.apache.log4j.PropertyConfiguratorTest.class);
  s.addTestSuite(org.apache.log4j.net.SMTPAppenderTest.class);
  s.addTestSuite(org.apache.log4j.net.TelnetAppenderTest.class);
  s.addTestSuite(org.apache.log4j.DefaultThrowableRendererTest.class);
  s.addTestSuite(org.apache.log4j.EnhancedThrowableRendererTest.class);
  s.addTestSuite(org.apache.log4j.TestLogXF.class);
  s.addTestSuite(org.apache.log4j.TestLogMF.class);
  s.addTestSuite(org.apache.log4j.TestLogSF.class);
  s.addTestSuite(org.apache.log4j.pattern.CachedDateFormatTest.class);
  s.addTestSuite(org.apache.log4j.pattern.FormattingInfoTest.class);
  s.addTestSuite(org.apache.log4j.pattern.NameAbbreviatorTest.class);
  s.addTestSuite(org.apache.log4j.pattern.PatternParserTest.class);
  return s;
}
 

Example 25

From project eclipse-integration-cloudfoundry, under directory /org.cloudfoundry.ide.eclipse.server.tests/src/org/cloudfoundry/ide/eclipse/server/tests/.

Source file: AllCloudFoundryTests.java

  15 
vote

public static Test suite(boolean heartbeat){
  TestSuite suite=new ManagedTestSuite(AllCloudFoundryTests.class.getName());
  if (!heartbeat) {
    suite.addTestSuite(CloudFoundryServerBehaviourTest.class);
  }
  suite.addTestSuite(ServerCredentialsStoreTest.class);
  suite.addTestSuite(CloudFoundryServerTest.class);
  suite.addTestSuite(CloudUtilTest.class);
  suite.addTestSuite(DeploymentURLTest.class);
  suite.addTestSuite(CloudFoundryServicesTest.class);
  suite.addTestSuite(CloudFoundryConsoleTest.class);
  suite.addTestSuite(CaldecottTunnelTest.class);
  return suite;
}
 

Example 26

From project eclipse-integration-commons, under directory /org.springsource.ide.eclipse.commons.tests/src/org/springsource/ide/eclipse/commons/tests/.

Source file: AllIdeTests.java

  15 
vote

public static Test suite(){
  TestSuite suite=new TestSuite(AllIdeTests.class.getName());
  suite.addTestSuite(HelpPluginTest.class);
  suite.addTestSuite(ConfiguratorImporterTest.class);
  suite.addTestSuite(ConfiguratorActionTest.class);
  suite.addTestSuite(DescriptorMatcherTest.class);
  suite.addTestSuite(ResourceProviderTest.class);
  suite.addTestSuite(CommandHistoryTest.class);
  suite.addTestSuite(UpdateNotificationTest.class);
  return suite;
}
 

Example 27

From project eclipse-integration-gradle, under directory /org.springsource.ide.eclipse.gradle.core.test/src/org/springsource/ide/eclipse/gradle/core/test/util/.

Source file: ManagedTestSuite.java

  15 
vote

public void endTest(Test test){
  if (task != null) {
    task.cancel();
    task=null;
  }
}
 

Example 28

From project eclipse.pde.build, under directory /org.eclipse.pde.build.tests/src/org/eclipse/pde/build/tests/.

Source file: P2TestSuite.java

  15 
vote

public static Test suite(){
  TestSuite suite=new TestSuite("Test Suite for p2 bits of org.eclipse.pde.build");
  suite.addTestSuite(P2Tests.class);
  suite.addTestSuite(PublishingTests.class);
  return suite;
}
 

Example 29

From project eclipsefp, under directory /net.sf.eclipsefp.haskell.core.jparser.test/src/net/sf/eclipsefp/haskell/core/jparser/ast/test/.

Source file: AllTests.java

  15 
vote

public static Test suite(){
  TestSuite suite=new TestSuite("Test for net.sf.eclipsefp.haskell.core.jparser.ast.test");
  suite.addTestSuite(FunctionBindingTest.class);
  suite.addTestSuite(DataDeclarationTest.class);
  suite.addTestSuite(TypeSignatureTest.class);
  suite.addTestSuite(SourceLocationTest.class);
  suite.addTestSuite(ClassDeclarationTest.class);
  suite.addTestSuite(ModuleTest.class);
  return suite;
}
 

Example 30

From project edna-rcp, under directory /org.edna.kernel.test/src/org/edna/kernel/test/.

Source file: AllTests.java

  15 
vote

public static Test suite(){
  TestSuite suite=new TestSuite("Test for org.edna_site.eclipse.kernel.test");
  suite.addTestSuite(TestCaseLauncher.class);
  suite.addTestSuite(TestCaseTestLauncherView.class);
  suite.addTestSuite(TestCaseXSDataCommon.class);
  return suite;
}
 

Example 31

From project entando-core-engine, under directory /src/test/java/com/agiletec/apsadmin/.

Source file: AllTests.java

  15 
vote

public static Test suite(){
  TestSuite suite=new TestSuite("Test for apsadmin");
  System.out.println("Test for apsadmin");
  suite.addTestSuite(TestLangAction.class);
  suite.addTestSuite(TestLangFinderAction.class);
  suite.addTestSuite(TestLocaleStringAction.class);
  suite.addTestSuite(TestLocaleStringFinderAction.class);
  suite.addTestSuite(TestBaseAdminAction.class);
  suite.addTestSuite(TestSystemParamsUtils.class);
  suite.addTestSuite(TestDispatchForward.class);
  suite.addTestSuite(TestLoginAction.class);
  suite.addTestSuite(TestBaseCommonAction.class);
  suite.addTestSuite(TestShortcutConfigAction.class);
  suite.addTestSuite(TestApiServiceFinderAction.class);
  suite.addTestSuite(TestCategoryAction.class);
  suite.addTestSuite(TestPageAction.class);
  suite.addTestSuite(TestPageConfigAction.class);
  suite.addTestSuite(TestPageTreeAction.class);
  suite.addTestSuite(TestShowletsViewerAction.class);
  suite.addTestSuite(TestShowletTypeAction.class);
  suite.addTestSuite(TestSimpleShowletConfigAction.class);
  suite.addTestSuite(TestNavigatorShowletConfigAction.class);
  suite.addTestSuite(TestEntityManagersAction.class);
  suite.addTestSuite(TestShortcutManager.class);
  suite.addTestSuite(TestUserAction.class);
  suite.addTestSuite(TestUserFinderAction.class);
  suite.addTestSuite(TestUserToAuthoritiesAction.class);
  suite.addTestSuite(TestAuthorityToUsersAction.class);
  suite.addTestSuite(TestGroupAction.class);
  suite.addTestSuite(TestGroupFinderAction.class);
  suite.addTestSuite(TestRoleAction.class);
  suite.addTestSuite(TestRoleFinderAction.class);
  return suite;
}
 

Example 32

From project erjang, under directory /src/test/java/erjang/.

Source file: AllTests.java

  15 
vote

public static Test suite(){
  TestSuite suite=new TestSuite("Test for erjang");
  TestSuite otpCompileSuite=new TestSuite("Compiling OTP");
  suite.addTest(otpCompileSuite);
  TestSuite coverageRunSuite=new TestSuite("Coverage run tests");
  Map<File,List<File>> testsErl=new HashMap<File,List<File>>();
  find_files(testsErl,new File("src/test/erl/deterministic"),".erl");
  buildTestHierarchy(testsErl,coverageRunSuite,OfflineComparisonTestCase.class);
  suite.addTest(coverageRunSuite);
  return suite;
}
 

Example 33

From project eucalyptus, under directory /clc/modules/storage-manager/src/edu/ucsb/eucalyptus/cloud/ws/tests/.

Source file: WalrusBucketTests.java

  15 
vote

public static Test suite(){
  final TestSuite suite=new TestSuite();
  suite.addTestSuite(BukkitTest.class);
  suite.addTestSuite(ObjectTest.class);
  return suite;
}
 

Example 34

From project FBReaderJ, under directory /obsolete/test/org/test/fbreader/collection/.

Source file: AllTests.java

  15 
vote

public static Test suite(){
  TestSuite suite=new TestSuite();
  suite.addTestSuite(TestBookCollection.class);
  suite.addTestSuite(TestBookList.class);
  return suite;
}
 

Example 35

From project fitnesse, under directory /src/fitnesse/testutil/.

Source file: TestSuiteMaker.java

  15 
vote

public static Test makeSuite(String name,Class<?>[] tests){
  TestSuite suite=new TestSuite(name);
  for (int i=0; i < tests.length; i++) {
    Class<?> test=tests[i];
    try {
      if (isSuite(test))       suite.addTest(getSuite(test));
 else       suite.addTest(new TestSuite(test));
    }
 catch (    Exception e) {
      System.err.println("Problem adding test to suite: " + test.getName());
    }
  }
  return suite;
}
 

Example 36

From project Flume-Hive, under directory /src/ahocorasick/org/arabidopsis/ahocorasick/.

Source file: TestAll.java

  15 
vote

public static Test suite(){
  TestSuite suite=new TestSuite();
  suite.addTestSuite(TestState.class);
  suite.addTestSuite(TestAhoCorasick.class);
  suite.addTestSuite(TestQueue.class);
  return suite;
}
 

Example 37

From project freemind, under directory /freemind/tests/freemind/.

Source file: AllTests.java

  15 
vote

public static Test suite(){
  TestSuite suite=new TestSuite("AllTests");
  suite.addTest(new TestSuite(Base64Tests.class));
  suite.addTest(new TestSuite(FindTextTests.class));
  suite.addTest(new TestSuite(HtmlConversionTests.class));
  suite.addTest(new TestSuite(TransformTest.class));
  suite.addTest(new TestSuite(MarshallerTests.class));
  suite.addTest(new TestSuite(SignedScriptTests.class));
  suite.addTest(new TestSuite(LastStorageManagementTests.class));
  suite.addTest(new TestSuite(ToolsTests.class));
  suite.addTest(new TestSuite(ExportTests.class));
  suite.addTest(new TestSuite(XmlBindingToolsTest.class));
  return suite;
}
 

Example 38

From project Gemini-Blueprint, under directory /test-support/src/main/java/org/eclipse/gemini/blueprint/test/internal/support/.

Source file: OsgiJUnitService.java

  15 
vote

/** 
 * Run fixture setup, test from the given test case and fixture teardown.
 * @param osgiTestExtensions
 * @param testName
 */
protected TestResult runTest(final OsgiJUnitTest osgiTestExtensions,String testName){
  if (log.isDebugEnabled())   log.debug("Running test [" + testName + "] on testCase "+ osgiTestExtensions);
  final TestResult result=new TestResult();
  TestCase rawTest=osgiTestExtensions.getTestCase();
  rawTest.setName(testName);
  try {
    osgiTestExtensions.osgiSetUp();
    try {
      result.runProtected(rawTest,new Protectable(){
        public void protect() throws Throwable {
          osgiTestExtensions.osgiRunTest();
        }
      }
);
    }
  finally {
      osgiTestExtensions.osgiTearDown();
    }
  }
 catch (  Exception ex) {
    log.error("test exception threw exception ",ex);
    result.addError((Test)rawTest,ex);
  }
  return result;
}
 

Example 39

From project github-java-sdk, under directory /core/src/test/java/com/github/api/v2/services/.

Source file: AllTests.java

  15 
vote

/** 
 * Suite.
 * @return the test
 */
public static Test suite(){
  TestSuite suite=new TestSuite("Test for com.github.api.v2.services");
  suite.addTestSuite(CommitServiceTest.class);
  suite.addTestSuite(IssueServiceTest.class);
  suite.addTestSuite(NetworkServiceTest.class);
  suite.addTestSuite(GistServiceTest.class);
  suite.addTestSuite(OrganizationServiceTest.class);
  suite.addTestSuite(FeedServiceTest.class);
  suite.addTestSuite(RepositoryServiceTest.class);
  suite.addTestSuite(PullRequestServiceTest.class);
  suite.addTestSuite(OAuthServiceTest.class);
  suite.addTestSuite(ObjectServiceTest.class);
  suite.addTestSuite(UserServiceTest.class);
  suite.addTestSuite(JobServiceTest.class);
  return suite;
}
 

Example 40

From project gnupg-for-java, under directory /src/junit/com/freiheit/gnupg/.

Source file: GnuPGTestSuite.java

  15 
vote

public static Test suite(){
  System.out.println("suite()");
  TestSuite suite=new TestSuite(GnuPGTestSuite.class);
  GnuPGContext ctx=getContext();
  String person1Key=" <GnupgKeyParms format=\"internal\">\n" + "Key-Type: DSA\n" + "Key-Length: 1024\n"+ "Subkey-Type: ELG-E\n"+ "Subkey-Length: 1024\n"+ "Name-Real: alpha\n"+ "Name-Comment: just a test\n"+ "Name-Email: [email protected]\n"+ "Expire-Date: 0\n"+ "Passphrase: alpha\n"+ "</GnupgKeyParms>";
  ctx.genKey(person1Key,null,null);
  String person2Key=" <GnupgKeyParms format=\"internal\">\n" + "Key-Type: DSA\n" + "Key-Length: 1024\n"+ "Subkey-Type: ELG-E\n"+ "Subkey-Length: 1024\n"+ "Name-Real: beta\n"+ "Name-Comment: just a test\n"+ "Name-Email: [email protected]\n"+ "Expire-Date: 0\n"+ "Passphrase: beta\n"+ "</GnupgKeyParms>";
  ctx.genKey(person2Key,null,null);
  System.out.println("done suite()");
  return suite;
}
 

Example 41

From project google-api-translate-java, under directory /src/test/java/com/google/api/.

Source file: AllTests.java

  15 
vote

public static Test suite(){
  TestSuite suite=new TestSuite("Test for test");
  suite.addTestSuite(TranslateTest.class);
  suite.addTestSuite(DetectTest.class);
  return suite;
}
 

Example 42

From project grails-ide, under directory /org.grails.ide.eclipse.groovy.debug.tests/src/org/grails/ide/eclipse/groovy/debug/tests/.

Source file: AllGroovyDebugTests.java

  15 
vote

public static Test suite(){
  TestSuite suite=new TestSuite("Run of all Groovy Debug tests");
  suite.addTestSuite(SanityChecker.class);
  suite.addTestSuite(GroovyDebugTests.class);
  suite.addTestSuite(GroovyConditionalBreakpointsTests.class);
  return suite;
}
 

Example 43

From project Grammar-Kit, under directory /tests/org/intellij/grammar/.

Source file: BnfTestSuite.java

  15 
vote

public static Test suite(){
  final TestSuite testSuite=new TestSuite();
  testSuite.addTestSuite(BnfParserTest.class);
  testSuite.addTestSuite(BnfGeneratorTest.class);
  testSuite.addTestSuite(ExpressionParserTest.class);
  testSuite.addTestSuite(BnfAttributeDescriptionTest.class);
  testSuite.addTestSuite(BnfFirstNextTest.class);
  testSuite.addTestSuite(BnfCompletionTest.class);
  testSuite.addTestSuite(BnfInspectionTest.class);
  testSuite.addTestSuite(BnfInlineRuleTest.class);
  testSuite.addTestSuite(BnfIntroduceRuleTest.class);
  testSuite.addTestSuite(BnfFlipChoiceIntentionTest.class);
  return testSuite;
}
 

Example 44

From project Guit, under directory /src/test/java/com/guit/client/binder/prefix/client/.

Source file: PrefixTestSuite.java

  15 
vote

public static Test suite(){
  TestSuite suite=new TestSuite("Test binder prefixes");
  suite.addTestSuite(PrefixAGwtTest.class);
  suite.addTestSuite(PrefixBGwtTest.class);
  suite.addTestSuite(PrefixCGwtTest.class);
  suite.addTestSuite(PrefixINVGwtTest.class);
  return suite;
}
 

Example 45

From project gwt-maven-plugin, under directory /src/main/java/org/codehaus/mojo/gwt/test/.

Source file: MavenTestRunner.java

  15 
vote

/** 
 * {@inheritDoc}
 * @see junit.textui.TestRunner#doRun(junit.framework.Test,boolean)
 */
@Override public TestResult doRun(Test suite,boolean wait){
  try {
    reportManager.runStarting(suite.countTestCases());
    ReportEntry report=new ReportEntry(this.getClass().getName(),suite.toString(),"starting");
    reportManager.testSetStarting(report);
    TestResult result=createTestResult();
    suite.run(result);
    return result;
  }
 catch (  ReporterException e) {
    System.err.println("Failed to log in test report " + e);
    return null;
  }
 finally {
    ReportEntry report=new ReportEntry(this.getClass().getName(),suite.toString(),"ended");
    reportManager.testSetCompleted(report);
    reportManager.runCompleted();
  }
}
 

Example 46

From project hbase-rdf_1, under directory /src/test/java/com/talis/hbase/rdf/test/graph/.

Source file: TestHBaseRdfGraph.java

  15 
vote

public static Test suite(){
  TestSuite ts=new TestSuite();
  ts.addTestSuite(TestHBaseRdfSimpleGraph.class);
  ts.addTestSuite(TestHBaseRdfVertPartGraph.class);
  ts.addTestSuite(TestHBaseRdfIndexedGraph.class);
  ts.addTestSuite(TestHBaseRdfVPIndexedGraph.class);
  ts.addTestSuite(TestHBaseRdfHybridGraph.class);
  ts.addTestSuite(TestHBaseRdfHashGraph.class);
  return ts;
}
 

Example 47

From project hdiv, under directory /hdiv-core/src/test/java/org/hdiv/.

Source file: AllCoreTests.java

  15 
vote

public static Test suite(){
  TestSuite suite=new TestSuite("Test for org.hdiv");
  suite.addTestSuite(CipherHttpTest.class);
  suite.addTestSuite(EditableParameterValidationTest.class);
  suite.addTestSuite(DataComposerMemoryTest.class);
  suite.addTestSuite(DataComposerHashTest.class);
  suite.addTestSuite(DataComposerCipherTest.class);
  suite.addTestSuite(DataValidatorTest.class);
  suite.addTestSuite(ValidatorHelperTest.class);
  suite.addTestSuite(UidGeneratorTest.class);
  suite.addTestSuite(StateCacheTest.class);
  suite.addTestSuite(StateUtilTest.class);
  suite.addTestSuite(FormUrlProcessorTest.class);
  suite.addTestSuite(LinkUrlProcessorTest.class);
  suite.addTestSuite(EncodingUtilTest.class);
  return suite;
}
 

Example 48

From project hibernate-tools, under directory /src/test/org/hibernate/tool/ant/.

Source file: AntAllTests.java

  15 
vote

public static Test suite(){
  TestSuite suite=new TestSuite("Test for org.hibernate.tool.ant");
  suite.addTestSuite(AntHibernateToolTest.class);
  suite.addTestSuite(JavaFormatterTest.class);
  return suite;
}