Data Range Assertion
my xml file has a execution date " 26-11-2021T11:59:59"
my expected output date is Trade Date + 1 so something like this 28-11-2021T11:59:59
How can i validate this logic and how can i assert this ?
And this will vary for various trade events .
Can some one help me please?
Comments
-
my xml file has a execution date " 26-11-2021T11:59:59"
Store this value using an XML Data Bank.
my expected output date is Trade Date + 1
Use the Data Generator Tool to add a day to your date-time. It will store the result in another data bank column.
How can i validate this logic and how can i assert this ?
Use an XML Assertor tool or Diff tool or small script (Extension tool) to compare the "Date + 1" value against the expected value.
1 -
As another alternative, you could possibly do this comparison using an XPath expression which you could evaluate in an XML Data Bank or XML Transformer tool. I haven't tried this myself but XPath supports date arithmetic and has a built-in "days-from-duration" function. From stackoverflow: How to calculate date difference with XPath only?
1 -
Thank you very much
I will give a try and share the result here0