Hi Idan,

I haven't had a chance to try this out, but here's where I'd start.

You'll need the 'normal' test-custom properties, and add in
-Dopenjpa.jdbc.DBDictionary and -Dopenjpa.jdbc.MappingDefaults.

So something like this should work :

 mvn test -Dtest=TestPersistence -Ptest-custom \
          -Dopenjpa.custom.driverjar= ${path to jdbc driver.jar} \
          -Dopenjpa.custom.driverclass= ${driver class name } \
          -Dopenjpa.custom.url= ${conn url } \
          -Dopenjpa.custom.username=USERNAME \
          -Dopenjpa.custom.password=PASSWORD \
          -Dopenjpa.jdbc.DBDictionary= ${ fully qualified DBDictionary class
name } \
          -Dopenjpa.jdbc.MappingDefaults = ${ fully qualified
MappingDefaults class name }

The system properties provide a default value for each of the properties -
if any testcases set DBDictionary or MappingDefaults explicitly these
settings won't override them.

Hopefully this helps
-mike


On Tue, Aug 3, 2010 at 7:17 AM, idan <[email protected]> wrote:

>
> Hi,
>
> I'm using OpenJPA's unit tests for testing OpenJPA's integration with my
> JDBC driver.
> On my regular tests i'm using a custom DBDictionary and MappingDefaults
> implementations.
>
> How can I make the unit tests (for example: TestPersistence) use these
> implementations?
>
> For running the unit tests i'm using "mvn test" with the "-Ptest-custom"
> parameter.
>
> Thanks,
> Idan
>
>
>
> --
> View this message in context:
> http://openjpa.208410.n2.nabble.com/Unit-tests-custom-DBDictionary-tp5368051p5368051.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

Reply via email to