Forum Discussion
Yki
2 years agoContributor
I am usually using "as BigDecimal"
Example:
def id = context.expand ('${testCaseProperties#id}') as BigDecimal
but I just tried and it works for Integer the same way.
def testnumber_one = "1"
log.info "testnumber_one has class: " + testnumber_one.getClass()
def testnumber_two = "4" as Integer
log.info "testnumber_two has class: " + testnumber_two.getClass()
- Tue Jun 13 16:34:21 CEST 2023: INFO: testnumber_one has class: class java.lang.String
- Tue Jun 13 16:34:21 CEST 2023: INFO: testnumber_two has class: class java.lang.Integer
Related Content
- 5 years ago
- 8 years ago
- 7 years ago
Recent Discussions
- 11 minutes ago
- 16 days ago