Uses of Interface
org.dbunit.IDatabaseTester
Packages that use IDatabaseTester
-
Uses of IDatabaseTester in org.dbunit
Classes in org.dbunit that implement IDatabaseTesterModifier and TypeClassDescriptionclassBasic implementation of IDatabaseTester.
Implementations of IDatabaseTester may use this class as a starting point.classDatabaseTester that uses aDataSourceto create connections.classDefault implementation of AbstractDatabaseTester, which does not know how to get a connection by itself.classDatabaseTester that uses JDBC's Driver Manager to create connections.classDatabaseTester that pulls a DataSource from a JNDI location.classDatabaseTester that configures a DriverManager from environment properties.
This class defines a set of keys for system properties that need to be present in the environment before using it.Methods in org.dbunit that return IDatabaseTesterModifier and TypeMethodDescriptionprotected IDatabaseTesterDatabaseTestCase.getDatabaseTester()Gets the IDatabaseTester for this testCase.
If the IDatabaseTester is not set yet, this method calls newDatabaseTester() to obtain a new instance.DatabaseTesterFactory.getDatabaseTester()Returns a configuredIDatabaseTester.DefaultPrepAndExpectedTestCase.getDatabaseTester()Get the databaseTester.default IDatabaseTesterPrepAndExpectedTestCase.getDatabaseTester()Get the databaseTester this test case uses.protected IDatabaseTesterDatabaseTestCase.newDatabaseTester()Creates a IDatabaseTester for this testCase.
ADefaultDatabaseTesteris used by default.protected IDatabaseTesterDataSourceBasedDBTestCase.newDatabaseTester()Creates a new IDatabaseTester.
Default implementation returns aDataSourceDatabaseTesterconfigured with the value returned fromDataSourceBasedDBTestCase.getDataSource().protected IDatabaseTesterDBTestCase.newDatabaseTester()Creates a new IDatabaseTester.DefaultPrepAndExpectedTestCase.newDatabaseTester()Creates a new IDatabaseTester.protected IDatabaseTesterJdbcBasedDBTestCase.newDatabaseTester()Creates a new IDatabaseTester.
Default implementation returns aJdbcDatabaseTesterconfigured with the values returned fromJdbcBasedDBTestCase.getDriverClass(),JdbcBasedDBTestCase.getConnectionUrl(),JdbcBasedDBTestCase.getUsername()andJdbcBasedDBTestCase.getPassword().protected IDatabaseTesterJndiBasedDBTestCase.newDatabaseTester()Creates a new IDatabaseTester.
Default implementation returns aJndiDatabaseTesterconfigured with the values returned fromJndiBasedDBTestCase.getJNDIProperties()andJndiBasedDBTestCase.getLookupName().Methods in org.dbunit with parameters of type IDatabaseTesterModifier and TypeMethodDescriptionMultiDataSourcePrepAndExpectedTestCase.add(String dataSourceName, IDatabaseTester tester) Wires one data source to a newDefaultPrepAndExpectedTestCasebound to the given tester, sharing this instance's loader andcloseConnectionAfterTest.voidDefaultPrepAndExpectedTestCase.setDatabaseTester(IDatabaseTester databaseTester) Set the databaseTester.default voidPrepAndExpectedTestCase.setDatabaseTester(IDatabaseTester databaseTester) Set the databaseTester this test case uses.Method parameters in org.dbunit with type arguments of type IDatabaseTesterModifier and TypeMethodDescriptionMultiDataSourcePrepAndExpectedTestCase.forTesters(DataFileLoader dataFileLoader, Map<String, ? extends IDatabaseTester> testersByDataSourceName) Creates an instance for the tester currency, seeded with the given testers - asMultiDataSourcePrepAndExpectedTestCase.forTesters(DataFileLoader)does, thenMultiDataSourcePrepAndExpectedTestCase.add(String, IDatabaseTester)for each entry, in the given map's iteration order.MultiDataSourcePrepAndExpectedTestCase.forTesters(DataFileLoader dataFileLoader, Map<String, ? extends IDatabaseTester> testersByDataSourceName, boolean closeConnectionAfterTest) Creates an instance for the tester currency, seeded with the given testers, asMultiDataSourcePrepAndExpectedTestCase.forTesters(DataFileLoader, Map)does, with the givencloseConnectionAfterTestapplied to every wrapped delegate.Constructors in org.dbunit with parameters of type IDatabaseTesterModifierConstructorDescriptionDefaultPrepAndExpectedTestCase(DataFileLoader dataFileLoader, IDatabaseTester databaseTester) Create new instance with specified dataFileLoader and databaseTester.DefaultPrepAndExpectedTestCase(DataFileLoader dataFileLoader, IDatabaseTester databaseTester, boolean closeConnectionAfterTest) Create new instance with specified dataFileLoader and databaseTester. -
Uses of IDatabaseTester in org.dbunit.annotation.runtime
Methods in org.dbunit.annotation.runtime that return IDatabaseTesterModifier and TypeMethodDescriptionAnnotatedTestExecutor.getTester()Returns the tester this executor drives, so a binding can inject it as a parameter without resolving a second, independent instance.static IDatabaseTesterInjectedTestCaseTesterBinding.resolveTester(PrepAndExpectedTestCase testCase, String fieldDescription, Callable<IDatabaseTester> fallbackTester) Resolves and wires the tester fortestCase.Methods in org.dbunit.annotation.runtime with parameters of type IDatabaseTesterModifier and TypeMethodDescriptionstatic TesterStateSnapshotTesterStateSnapshot.capture(IDatabaseTester tester) Capturestester's current dataset and setup/teardown operations.static voidTesterStateSnapshot.restore(IDatabaseTester tester, TesterStateSnapshot snapshot) Restoressnapshotontotester, or does nothing whensnapshotisnull- the case when a lifecycle threw before capturing one, or never reached the capture at all.static voidTesterStateSnapshot.restoreSuppressing(IDatabaseTester tester, TesterStateSnapshot snapshot, Throwable primary) Restoressnapshotontotesterwhileprimaryis already being thrown, attaching any failure from the restore itself to it viaThrowable.addSuppressed(Throwable)rather than letting that failure replace the one already in flight.voidTesterStateSnapshot.restoreTo(IDatabaseTester tester) Restores this snapshot's dataset and setup/teardown operations ontotester.Method parameters in org.dbunit.annotation.runtime with type arguments of type IDatabaseTesterModifier and TypeMethodDescriptionstatic IDatabaseTesterInjectedTestCaseTesterBinding.resolveTester(PrepAndExpectedTestCase testCase, String fieldDescription, Callable<IDatabaseTester> fallbackTester) Resolves and wires the tester fortestCase.Constructors in org.dbunit.annotation.runtime with parameters of type IDatabaseTesterModifierConstructorDescriptionAnnotatedTestExecutor(AnnotatedTestConfiguration configuration, IDatabaseTester tester, PrepAndExpectedTestCase prepAndExpectedTestCase) Creates an executor for an annotation-driven test - equivalent toAnnotatedTestExecutor(AnnotatedTestConfiguration, IDatabaseTester, PrepAndExpectedTestCase, boolean)withannotationDriventrue.AnnotatedTestExecutor(AnnotatedTestConfiguration configuration, IDatabaseTester tester, PrepAndExpectedTestCase prepAndExpectedTestCase, boolean annotationDriven) Creates an executor for one test.