mercredi 19 juin 2019

Spock jacoco test coverage for lambda expression

I have a block of code as follows:

   jdbc.query(sqlQuery) { rs: ResultSet ->
        //do something
   }

In my Spock test I mock this call

   1 * jdbc.query(_, _)

In the jacoco report the block of code in the lambda is red. How can I mock that in Spock?

Aucun commentaire:

Enregistrer un commentaire