XML : XML attribute double value

I'm trying to use DBUnit to test my repository service. I have this xml that show the expected result:

      <?xml version="1.0" encoding="UTF-8"?>  <dataset>      <product id="1" description="Printer" price="75.0" />  </dataset>    

id= String , description = String , price = double.

The problem is: i'm used to json, not to XML. so I don't know how to format an attribute as type double. I tried: price="75.0" , price=75.0 , price=75

I cannot cast it to double afterwards, because I let DBUnit do the parsing:

  IDataSet expectedDataset = new FlatXmlDataSetBuilder().build(expectedDataSetFile);    

currently, my assertion fails because of this problem, in debugger i see the data is put in correctly. expected enter image description here

No comments:

Post a Comment