Spock Web Console

subscribe to the feed Subscribe
Testing statics (via #spockwebconsole)
tweet this script Tweet

Testing statics

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

public class WrapperClass {

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

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

}

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