Export to GitHub

spock - issue #343

Cannot resolve symbol from where: section after instanceof


Posted on Jan 31, 2014 by Helpful Ox

I want to do something like this:

@Unroll def " should contain #clazz.getSimpleName() bean"() { given: builder.build()

    when:
    def component = builder.getContainerComponent(clazz)

    then:
    component instanceof clazz

    where:
    clazz << [Javers, EntityManager, TypeMapper, DiffFactory]

}

but in line 10 i have compilation problem. The IntelliJ tell's me that cannot resolve symbol clazz, but when i use Assertj and do something like this (in line 10):

assertThat(component) isInstanceOf(clazz)

it works ;)

I try in Intellij 12 and 13.

What version of Spock and Groovy are you using? 0.7-groovy-2.0

Status: New

Labels:
Type-Defect Module-Core