congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ProxyTestSuite
Code IndexAdd Tabnine to your IDE (free)

How to use
ProxyTestSuite
in
junit.extensions.proxy

Best Java code snippets using junit.extensions.proxy.ProxyTestSuite (Showing top 20 results out of 315)

origin: blazegraph/database

public static Test suite() {
  final TestDirectJournal delegate = new TestDirectJournal(); // !!!! THIS CLASS !!!!
  /*
   * Use a proxy test suite and specify the delegate.
   */
  ProxyTestSuite suite = new ProxyTestSuite(delegate,
      "Direct Journal Test Suite");
  /*
   * List any non-proxied tests (typically bootstrapping tests).
   */
  
  // tests defined by this class.
  suite.addTestSuite(TestDirectJournal.class);
  // test suite for the IRawStore api.
  suite.addTestSuite( TestRawStore.class );
  
  // test suite for handling asynchronous close of the file channel.
  suite.addTestSuite( TestInterrupts.class );
  // test suite for MROW correctness.
  suite.addTestSuite( TestMROW.class );
  // test suite for MRMW correctness.
  suite.addTestSuite( TestMRMW.class );
  /*
   * Pickup the basic journal test suite. This is a proxied test suite, so
   * all the tests will run with the configuration specified in this test
   * class and its optional .properties file.
   */
  suite.addTest(TestJournalBasics.suite());
  return suite;
}
origin: blazegraph/database

  @Override
  public void addTest(final Test test) {
    for (final ProxyTestSuite s:subs) {
      s.addTest(cloneTest(s.getDelegate(),test));
    }
  }
}
origin: blazegraph/database

/**
 * Creates an empty unnamed test suite. The <i>delegate </i> will be
 * assigned to tests added to this test suite that implement
 * {@link IProxyTest}.
 * 
 * @param delegate
 *            The delegate (non-null).
 */
public ProxyTestSuite( Test delegate )
{

  super();
checkDelegate( delegate );

m_delegate = delegate;
}
origin: blazegraph/database

/**
 * Create and populate a {@link ProxyTestSuite} with the unit tests that we
 * will run against any of the {@link IIndexManager} implementations.
 * 
 * @param delegate
 *            The delegate for the proxied unit tests.
 * @param name
 *            The name of the test suite.
 * @return The {@link ProxyTestSuite} populated with the unit tests.
 */
protected static ProxyTestSuite proxySuite(
    AbstractIndexManagerTestCase<? extends IIndexManager> delegate, String name) {
  final ProxyTestSuite suite = new ProxyTestSuite(delegate, name);
  // sparse row store operations.
  suite.addTestSuite(TestSparseRowStore.class);
  
  return suite;
  
}
origin: blazegraph/database

ProxyTestSuite proxyTestSuite = new ProxyTestSuite
  ( m_delegate,
   testClass
   );
addTest( proxyTestSuite );
origin: blazegraph/database

 suite.addTestSuite(TestRWStoreTxBehaviors.class);
 suite.addTestSuite(TestBackupServlet.class);
suite.addTest(TestProtocolAll.suite());
suite.addTestSuite(Test_REST_Structure.class);
suite.addTestSuite(Test_REST_ASK.class);
suite.addTestSuite(Test_REST_DESCRIBE.class);
suite.addTestSuite(Test_REST_ESTCARD.class);
if(BigdataStatics.runKnownBadTests) {// FIXME Restore for BLZG-1195
  suite.addTestSuite(Test_REST_ESTCARD.ReadWriteTx.class);
suite.addTestSuite(Test_REST_HASSTMT.class);
if(BigdataStatics.runKnownBadTests) {// FIXME Restore for BLZG-1195
  suite.addTestSuite(Test_REST_HASSTMT.ReadWriteTx.class);
 suite.addTestSuite(Test_REST_HASSTMT.TruthMaintenance.class);
 suite.addTestSuite(Test_Ticket_1207.class); // BLZG-1207 (GETSTMTS with includeInferred)
 suite.addTestSuite(TestSparqlUpdateSuppressTruthMaintenance.class); 
suite.addTestSuite(Test_REST_ServiceDescription.class);
suite.addTestSuite(Test_REST_DELETE_BY_ACCESS_PATH.class);
suite.addTestSuite(Test_REST_DELETE_WITH_BODY.class);
suite.addTestSuite(TestNanoSparqlClient.class);
suite.addTestSuite(TestMultiTenancyAPI.class); // Multi-tenancy API.
suite.addTestSuite(TestDataLoaderServlet.class); // Data Loader Servlet
origin: blazegraph/database

  @Override
  public void addTest(Test test) {
    super.addTest(cloneTest(getDelegate(),test));
  }
}
origin: blazegraph/database

static ProxyTestSuite createProxyTestSuite(final IIndexManager indexManager, final TestMode testMode) {
  final TestNanoSparqlServerWithProxyIndexManager<?> delegate = new TestNanoSparqlServerWithProxyIndexManager(
      null/* name */, indexManager, testMode); // !!!! THIS CLASS !!!!
 /*
  * Use a proxy test suite and specify the delegate.
  */
 final ProxyTestSuite suite = new ProxyTestSuite(delegate,
    "NanoSparqlServer Proxied Test Suite: indexManager="
       + indexManager.getClass().getSimpleName()
       + ", testMode="
       + testMode
       + ", bufferMode="
       + (indexManager instanceof Journal ? ((Journal) indexManager)
          .getBufferStrategy().getBufferMode() : ""));
 return suite;
 
}
origin: blazegraph/database

@SuppressWarnings("rawtypes")
@Override
public void addTestSuite(final Class clazz) {
  for (final ProxyTestSuite s:subs) {
    s.addTestSuite(clazz);
  }
}
origin: blazegraph/database

        @SuppressWarnings("rawtypes")
        @Override
        protected void tearDown() throws Exception {
          ((TestNanoSparqlServerWithProxyIndexManager)suite2.getDelegate()).tearDownAfterSuite();
          /*
           * Note: Do not clear. Will not leak unless the
           * QueryEngine objects are pinned. They will not be
           * pinned if you shutdown the Journal correctly for each
           * test; the call to tearDownAfterSuite above calls the destroy() method
           * on temporary journals, which appears to do the necessary thing.
           */
//		    			QueryEngineFactory.clearStandAloneQECacheDuringTesting();
        }
      });
origin: blazegraph/database

checkDelegate( delegate );
flowDown(this);
checkDelegate( delegate );
flowDown(this);
origin: com.blazegraph/junit-ext

protected void flowDown(Test t) {
  if (m_delegate == null) {
    throw new AssertionError("delegate is not set.");
  }
  
  if ( t instanceof TestSuite ) {
    
    flowDown( (TestSuite) t );
    
  } else if (t instanceof IProxyTest) {
    log.debug("Setting delegate on " + t.getClass() + " to "
        + m_delegate.getClass());
    ((IProxyTest) t).setDelegate(m_delegate);
  }
}
 
origin: com.blazegraph/bigdata-core-test

/**
 * Create and populate a {@link ProxyTestSuite} with the unit tests that we
 * will run against any of the {@link IIndexManager} implementations.
 * 
 * @param delegate
 *            The delegate for the proxied unit tests.
 * @param name
 *            The name of the test suite.
 * @return The {@link ProxyTestSuite} populated with the unit tests.
 */
protected static ProxyTestSuite proxySuite(
    AbstractIndexManagerTestCase<? extends IIndexManager> delegate, String name) {
  final ProxyTestSuite suite = new ProxyTestSuite(delegate, name);
  // sparse row store operations.
  suite.addTestSuite(TestSparseRowStore.class);
  
  return suite;
  
}
origin: com.blazegraph/junit-ext

ProxyTestSuite proxyTestSuite = new ProxyTestSuite
  ( m_delegate,
   testClass
   );
addTest( proxyTestSuite );
origin: blazegraph/database

 suite.addTestSuite(TestRWStoreTxBehaviors.class);
 suite.addTestSuite(TestBackupServlet.class);
suite.addTest(TestProtocolAll.suite());
suite.addTestSuite(Test_REST_Structure.class);
suite.addTestSuite(Test_REST_ASK.class);
suite.addTestSuite(Test_REST_DESCRIBE.class);
suite.addTestSuite(Test_REST_ESTCARD.class);
if(BigdataStatics.runKnownBadTests) {// FIXME Restore for BLZG-1195
  suite.addTestSuite(Test_REST_ESTCARD.ReadWriteTx.class);
suite.addTestSuite(Test_REST_HASSTMT.class);
if(BigdataStatics.runKnownBadTests) {// FIXME Restore for BLZG-1195
  suite.addTestSuite(Test_REST_HASSTMT.ReadWriteTx.class);
 suite.addTestSuite(Test_REST_HASSTMT.TruthMaintenance.class);
 suite.addTestSuite(Test_Ticket_1207.class); // BLZG-1207 (GETSTMTS with includeInferred)
 suite.addTestSuite(TestSparqlUpdateSuppressTruthMaintenance.class); 
suite.addTestSuite(Test_REST_ServiceDescription.class);
suite.addTestSuite(Test_REST_DELETE_BY_ACCESS_PATH.class);
suite.addTestSuite(Test_REST_DELETE_WITH_BODY.class);
suite.addTestSuite(TestNanoSparqlClient.class);
suite.addTestSuite(TestMultiTenancyAPI.class); // Multi-tenancy API.
suite.addTestSuite(TestDataLoaderServlet.class); // Data Loader Servlet
origin: blazegraph/database

  @Override
  public void addTest(Test test) {
    super.addTest(cloneTest(getDelegate(),test));
  }
}
origin: blazegraph/database

static ProxyTestSuite createProxyTestSuite(final IIndexManager indexManager, final TestMode testMode) {
  final TestNanoSparqlServerWithProxyIndexManager<?> delegate = new TestNanoSparqlServerWithProxyIndexManager(
      null/* name */, indexManager, testMode); // !!!! THIS CLASS !!!!
 /*
  * Use a proxy test suite and specify the delegate.
  */
 final ProxyTestSuite suite = new ProxyTestSuite(delegate,
    "NanoSparqlServer Proxied Test Suite: indexManager="
       + indexManager.getClass().getSimpleName()
       + ", testMode="
       + testMode
       + ", bufferMode="
       + (indexManager instanceof Journal ? ((Journal) indexManager)
          .getBufferStrategy().getBufferMode() : ""));
 return suite;
 
}
origin: blazegraph/database

@SuppressWarnings("rawtypes")
@Override
public void addTestSuite(final Class clazz) {
  for (final ProxyTestSuite s:subs) {
    s.addTestSuite(clazz);
  }
}
origin: blazegraph/database

        @SuppressWarnings("rawtypes")
        @Override
        protected void tearDown() throws Exception {
          ((TestNanoSparqlServerWithProxyIndexManager)suite2.getDelegate()).tearDownAfterSuite();
          /*
           * Note: Do not clear. Will not leak unless the
           * QueryEngine objects are pinned. They will not be
           * pinned if you shutdown the Journal correctly for each
           * test; the call to tearDownAfterSuite above calls the destroy() method
           * on temporary journals, which appears to do the necessary thing.
           */
//		    			QueryEngineFactory.clearStandAloneQECacheDuringTesting();
        }
      });
origin: com.blazegraph/junit-ext

checkDelegate( delegate );
flowDown(this);
checkDelegate( delegate );
flowDown(this);
junit.extensions.proxyProxyTestSuite

Javadoc

A simple wrapper around TestSuite that permits the caller to specify the delegate Test for either directly or recursively contained IProxyTests added to a ProxyTestSuite. There are three cases for junit:

  1. An instantiated test. This is an instance of some class that extends TestCase. If the class implements IProxyTest then the delegate will be set on the test instance and will be available when that test runs.
  2. A test case. This is a class named to TestSuite#addTestSuite(java.lang.Class). That method scans the test case class and generates an instantiated test for each conforming test method identified in the test case. The delegate is then set per above.
  3. A test suite. The delegate declared in a ProxyTestSuiteconstructor will be flowed down to each test added either directly or indirectly to that ProxyTestSuite. The various constructors all invoke this method to flow down the delegate. In addition, the #addTest(Test) and #addTestSuite(Class) methods also invoke this method to flow down the delegate to instantiated tests that implement IProxyTest.

The only case when flow down does not occur is when you have created a standard test suite, addeded it to a proxy test suite, and then you add additional tests to the standard test suite. There is no event notification model in junit and this action is not noticed by the ProxyTestSuite.

Most used methods

  • <init>
    Creates an empty named test suite. The declared will be assigned to tests added to this test suite t
  • addTest
    If the suite is not a ProxyTestSuite, then the tests in the suite are recursively enumerated and a p
  • addTestSuite
    We override the implementation of TestSuite#addTestSuite(Class theClass) to wrap thetestClass in ano
  • getDelegate
    Returns the delegate supplied to the constructor.
  • checkDelegate
    Invoked automatically by the constructors.
  • flowDown
    Sets the delegate on each instantiated Test that implements IProxyTest.

Popular in Java

  • Parsing JSON documents to java classes using gson
  • compareTo (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (Timer)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • ImageIO (javax.imageio)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • IsNull (org.hamcrest.core)
    Is the value null?
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now