Forum Discussion
PaulMS
Super Contributor
Convert the string to date or double, then you could test the values.
http://stackoverflow.com/questions/3817862/groovy-string-to-date
http://stackoverflow.com/questions/5769669/convert-string-to-double-in-java
marlonumali
8 years agoOccasional Contributor
Here is what I did to convert and test my response data.
def response = new XmlSlurper().parseText(hl.prettyXml)
def val1 = response.RootNode.ChildNode
def val2= Date.parse('yyyy-MM-dd' , val1.toString())
assert (val2 instanceof Date)
Related Content
- 2 years ago
- 4 years ago
- 4 years ago
- 9 years ago
Recent Discussions
- 15 years ago