Forum Discussion
_ivanovich_
6 years agoFrequent Contributor
OK so see the follwing example:
It should fail for me but it doesn't
try{
def b = 14
def a =1
if(a == '2'){
assert a == b
}
}catch (AssertionError e)
....
nmrao
6 years agoCommunity Hero
should it not be a==2 instead?
- _ivanovich_6 years agoFrequent Contributor
Yes Rao.
But in my code there were more problems because some data were string and some not, so i first remove the try catch block then i convert my data correctly and i just use the if else and assert. it works well for what i was looking for. Sorry for all mistakes.