Actually, looking at this example, it should probably set up auto-creating
of the schema during the test as well.  I'll try to get you some 3.1 code
that shows that.

On Fri, Jan 22, 2016 at 1:54 PM, Michael Gentry <mgen...@masslight.net>
wrote:

> I have an example in 3.0.2, but could update it sometime.  With 3.1 (and
> 4.0) you'd use a Cayenne DI Module, which I did on another project, but it
> is far too large to share/etc.  Here is my 3.0.2 example:
>
>
> https://github.com/mrg/cbe/blob/master/UnitTesting/src/test/java/cbe/testing/AppTest.java
>
> Let me know if you'd like an updated (to 3.1) version.
>
> mrg
>
>
> On Fri, Jan 22, 2016 at 1:50 PM, Hugi Thordarson <h...@karlmenn.is> wrote:
>
>> Ah, sorry about that… I’m using the current 4.0 snapshots.
>>
>> - hugi
>>
>>
>>
>> > On 22. jan. 2016, at 18:47, Michael Gentry <mgen...@masslight.net>
>> wrote:
>> >
>> > Which version of Cayenne are you using?
>> >
>> >
>> > On Fri, Jan 22, 2016 at 1:25 PM, Hugi Thordarson <h...@karlmenn.is>
>> wrote:
>> >
>> >> Hi all,
>> >>
>> >> I’m writing some tests for my DataObjects. Before the tests run, I’d
>> like
>> >> to provision an h2 database and switch my model’s connection to it for
>> the
>> >> purpose of testing.
>> >>
>> >> What’s the preferred way to switch the connection programmatically?
>> >>
>> >> Cheers,
>> >> - hugi
>>
>>
>

Reply via email to