spock - Within a helper method,the '*' of 1*mock.method() is recognized as multiplication sign -


i tried move verifications from

then:    1*mock.method()    result.value>0 

to helper method this,

 def reusedverification(mock mock,model result){      assert 1*mock.method()      assert result.value>0  } 

but spock givens me error this

groovy.lang.groovyruntimeexception: ambiguous method overloading method java.lang.integer#multiply.cannot resolve method invoke [null] due overlapping prototypes between:      [class java.lang.character]      [class java.lang.number] @ ..... 

i think '*' sign recognized multiplication sign in helper method,how can solve problem?

spock's mock verification syntax works directly in body of test.


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -