-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow specifying dataSetLoader in @DtabaseSetup/@ExpectedDatabase/@DatabaseTearDown #162
Comments
Is there a reason you cannot split that test class into 2 separate ones? You would then be able to define the |
Because I use a FlatXmlDataSet for the setup and a XmlDataSet for the expected data (which contains the HTML). I could modify the first one to be a XmlDataSet as well, but anyway what I proposed would be a nice feature to have. |
Could you provide examples of such files please? Although I can understand the purpose of different loaders for different test classes/methods, I'm struggling to understand why the same test would use different loaders for the sample and expected data. It'll probably be easier to see the added value with an example. |
All of my datasets use the FlatXmlDataSet format, but now I need to compare some HTML strings. To achieve that, I need to use the XmlDataSet format so I can wrap my expected HTML into a CDATA tag (because writing it in an attribute using the FlatXmlDataSet format is impossible due to XML limitations).
Currently, I can set up
@DbUnitConfiguration(dataSetLoader = XmlDataSetLoader.class)
, but that would mean I would need to rewrite all of my already created datasets (or at least the ones I created for the class).Is there any possibility to set a dataSetLoader atomically to a specific dataset to load (
@DatabaseSetup
,@ExpectedDatabase
,@DatabaseTearDown
)? It would be very useful.Thanks in advance.
The text was updated successfully, but these errors were encountered: