Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 spock 模拟一组字符串。我会将这个模拟对象作为参数传递给方法。
有人可以给我那个语法吗?
我试过了,def set = Mock(Set) 但它没有模拟一组字符串。
坏问题:)这行得通,
def setStrings = Mock(_ as Set)