takimafr / spring-dbunit

DBUnit support for Spring
Apache License 2.0
40 stars 19 forks source link

Default escape pattern #15

Closed eric-taix closed 12 years ago

eric-taix commented 12 years ago

The default escape pattern in spring-dbunit is "\"?\"" while the default escape pattern in dbunit is "" (null).

I think that the default value should be null. The only way to workaround this issue is to set the escapePattern but unfortunately null value is not allowed ! So I had to set an invalid value

@Dataset(escapePattern="null", value="my-dataset1.xml") @Test public void test1() { }

slandelle commented 12 years ago

Hi,

Have you tried passing an empty String, instead of null?

eric-taix commented 12 years ago

Hi,

Thks for your quick reply. Yes it was my first attempt to workaround this issue. Here's the trace when using an empty string: org.dbunit.DatabaseUnitRuntimeException: Empty string is an invalid escape pattern! DBUnit version 2.4.8

slandelle commented 12 years ago

I've just release 1.1.8 with the fix. Thanks for reporting.

Stephane