Commit de16dea0 by ibaker Committed by Ian Baker

Re-word the DataSourceContractTest javadoc

This softens the language around suppressing individual test methods.
There are some legitimate cases where this is needed, e.g.
ByteArrayDataSourceContractTest has to suppress all the tests related
to non-existent resources because it's not possible to simulate that
case.

#minor-release

PiperOrigin-RevId: 380570017
parent e2040a58
...@@ -53,16 +53,14 @@ import org.mockito.Mockito; ...@@ -53,16 +53,14 @@ import org.mockito.Mockito;
/** /**
* A collection of contract tests for {@link DataSource} implementations. * A collection of contract tests for {@link DataSource} implementations.
* *
* <p>All these tests should pass for all implementations - behaviour specific to only a subset of
* implementations should be tested elsewhere.
*
* <p>Subclasses should only include the logic necessary to construct the DataSource and allow it to * <p>Subclasses should only include the logic necessary to construct the DataSource and allow it to
* successfully read data. They shouldn't include any new {@link Test @Test} methods - * successfully read data. They shouldn't include any new {@link Test @Test} methods -
* implementation-specific tests should be in a separate class. * implementation-specific tests should be in a separate class.
* *
* <p>If one of these tests fails for a particular {@link DataSource} implementation, that's a bug * <p>Most implementations should pass all these tests. If necessary, subclasses can disable tests
* in the implementation. The test should be overridden in the subclass and annotated {@link * by overriding the {@link Test @Test} method with a no-op implementation. It's recommended (but
* Ignore}, with a link to an issue to track fixing the implementation and un-ignoring the test. * not required) to also annotate this {@link Ignore @Ignore} so that JUnit correclty reports the
* test as skipped/ignored instead of passing.
*/ */
@RequiresApi(19) @RequiresApi(19)
public abstract class DataSourceContractTest { public abstract class DataSourceContractTest {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment