Spock Web Console

subscribe to the feed Subscribe
testing static (via #spockwebconsole)
tweet this script Tweet

testing static

Published 4 months ago by dfernandes
Actions  ➤ Edit In Console Back To Console Show/Hide Line Numbers View Recent Scripts
import spock.lang.*

public class Potato {
    public static getInt() {
        return 1;
    }
}

public class WrapperClass {

    public static int getInt() {
        return Potato.getInt()
    }

}

class StaticTestsSpec extends Specification {
  def "let's try this!"() {
    expect:
    WrapperClass.getInt() == 1
  }
}