Skip to content

Instantly share code, notes, and snippets.

View jameselsey's full-sized avatar

James Elsey jameselsey

View GitHub Profile
@jameselsey
jameselsey / User.java
Created December 23, 2013 12:23
Gist for my spock blog post: http://www.jameselsey.co.uk/blogs/techblog/why-all-java-devs-should-at-least-consider-groovy-and-spock-for-testing Place source files in src/main and run `gradle idea` to create an intelliJ project file
package com.jameselsey.demo.spocktutorial.domain;
public class User {
private int id;
private String name;
private int age;
public int getId() {
return id;
public final class MyUtilityClass{
// Sonar wants me to add private constructors to static util classes
private MyUtilityClass() {
}
public static String someUtilityMethod(String input){
return input.reverse();
}