takimafr / spring-dbunit

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

Add a "global" dbType like schema #19

Closed bokc closed 10 years ago

bokc commented 11 years ago

I need to configure the DBType by the environnement (Maven profil) for the test. I use DB like data base for qualification test and mem data base for dev test.

slandelle commented 11 years ago

Sadly, that would have to wait for the refactoring I mentioned for #18. The problem is that enum fields can't have default values that can't be inlined. @DataSet.dbType is a enum so it would require a String (the System property value) to enum value conversion.

rsertelon commented 10 years ago

@bokc Is this issue still relevant?

bokc commented 10 years ago

Yes.

rsertelon commented 10 years ago

@bokc I've added a system property named spring.dbunit.dbtype that you can assign to a value of com.excilys.ebi.spring.dbunit.config.DBType.

If it looks good to you (ie it answers your problem), tell me, and I'll merge for next release.

bokc commented 10 years ago

It look good for me.

rsertelon commented 10 years ago

Ok, merging then.