Codota Logo
ProxyTestSuite
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
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

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (Timer)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSystemService (Context)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • JLabel (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now