Package org.pluginbuilder.autotestsuite.junit3

Examples of org.pluginbuilder.autotestsuite.junit3.Property


    TestPluginScanner scanner = new TestPluginScanner( pluginInclusionPattern, pluginExclusionPattern, filter );
    return scanner.findTestBundles();
  }

  public Collection<Class<?>> findTestClasses(Bundle bundle) {
    ClassFilter filter = new AndClassFilter( new IsJUnit4TestFilter(), new NotClassFilter( new IsSWTBotTestFilter(
        bundle ) ) );
    TestClassScanner scanner = new TestClassScanner( bundle, classInclusionPattern, classExclusionPattern, filter );
    return scanner.findTestClasses();
  }
View Full Code Here


    TestClassScanner scanner = new TestClassScanner( bundle, classInclusionPattern, classExclusionPattern, filter );
    return scanner.findTestClasses();
  }

  public Collection<Class<?>> findNonUIThreadTestClasses(Bundle bundle) {
    ClassFilter filter = new IsSWTBotTestFilter( bundle );
    TestClassScanner scanner = new TestClassScanner( bundle, classInclusionPattern, classExclusionPattern, filter );
    return scanner.findTestClasses();
  }
View Full Code Here

    for (RunListener listener : listeners)
      core.addListener( listener );

    Request request = RequestCompatibility.createRequest( classes );

    SystemOutputCapture capture = new SystemOutputCapture();
    capture.start();

    Result result;
    try {
      result = core.run( request );
    } finally {
      capture.stop();
    }

    for (RunListener listener : listeners) {
      if (listener instanceof JUnit4Formatter) {
        try {
          JUnit4Formatter formatter = (JUnit4Formatter) listener;
          formatter.setSystemOutput( capture.getCapturedOut() );
          formatter.setSystemError( capture.getCapturedErr() );
          formatter.save();
        } catch (IOException ignored) {
          ignored.printStackTrace();
        }
      }
View Full Code Here

    // fTestResult.addListener( this );
    fTestResult.addListener( formatter );
    long start = System.currentTimeMillis();
    fireStartTestSuite();

    SystemOutputCapture capture = new SystemOutputCapture();
    capture.start();
    try {
      // pm.snapshot(1); // before
      fSuite.run( fTestResult );
    } finally {
      // pm.snapshot(2); // after
      capture.stop();
      sendOutAndErr( capture.getCapturedOut(), capture.getCapturedErr() );
      fJunitTest.setCounts( fTestResult.runCount(), fTestResult.failureCount(), fTestResult.errorCount() );
      fJunitTest.setRunTime( System.currentTimeMillis() - start );
    }

    fireEndTestSuite();
View Full Code Here

  }

  public Collection<Class<?>> findTestClasses(Bundle bundle) {
    ClassFilter filter = new AndClassFilter( new IsJUnit4TestFilter(), new NotClassFilter( new IsSWTBotTestFilter(
        bundle ) ) );
    TestClassScanner scanner = new TestClassScanner( bundle, classInclusionPattern, classExclusionPattern, filter );
    return scanner.findTestClasses();
  }
View Full Code Here

    return scanner.findTestClasses();
  }

  public Collection<Class<?>> findNonUIThreadTestClasses(Bundle bundle) {
    ClassFilter filter = new IsSWTBotTestFilter( bundle );
    TestClassScanner scanner = new TestClassScanner( bundle, classInclusionPattern, classExclusionPattern, filter );
    return scanner.findTestClasses();
  }
View Full Code Here

        CLASS_EXCLUSIONS_DEFAULT );
  }

  public Collection<Bundle> findTestBundles() {
    BundleFilter filter = new IsJUnit4BundleFilter();
    TestPluginScanner scanner = new TestPluginScanner( pluginInclusionPattern, pluginExclusionPattern, filter );
    return scanner.findTestBundles();
  }
View Full Code Here

    assertEquals( wmsService, services.get( 2 ) );

    // Test that Service methods succeed after build.
    List<Property> propList = s.getProperties();
    assertEquals( 2, propList.size() );
    Property prop1 = propList.get( 0 );
    Property prop2 = propList.get( 1 );

    assertEquals( "propName1", prop1.getName() );
    assertEquals( "propName2", prop2.getName() );

    assertEquals( "propValue1", prop1.getValue() );
    assertEquals( "propValue2", prop2.getValue() );
  }
View Full Code Here

    assertFalse( "New property container has property [name].",
                 pc.containsPropertyName( "name" ));
    assertTrue( "New property container list of properties not empty.",
                pc.getProperties().isEmpty());
    Property prop = pc.getPropertyByName( "name" );
    if ( prop != null )
      fail( "New property container holds unexpected property [name]/["+prop.getValue()+"].");
    assertTrue( "New property container list of property names not empty.",
                pc.getPropertyNames().isEmpty());
    String value = pc.getPropertyValue( "name" );
    if ( value != null )
      fail( "New property container holds unexpected property value [name]/["+value+"].");
View Full Code Here

  public void testNormal()
  {
    String name = "a name";
    String value = "a value";
    Property p = null;
    try
    { p = new PropertyImpl( name, value ); }
    catch ( IllegalArgumentException e )
    { fail( "Unexpected IllegalArgumentException: " + e.getMessage() ); }
    catch ( Exception e )
    { fail( "Unexpected Non-IllegalArgumentException: " + e.getMessage()); }

    assertTrue( "Property name [" + p.getName() + "] not as expected [" + name + "].",
                p.getName().equals( name));
    assertTrue( "Property value [" + p.getValue() + "] not as expected [" + value + "].",
                p.getValue().equals( value));
  }
View Full Code Here

TOP

Related Classes of org.pluginbuilder.autotestsuite.junit3.Property

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.