Skip to content

Instantly share code, notes, and snippets.

@djleeds
Last active December 18, 2015 22:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djleeds/5855274 to your computer and use it in GitHub Desktop.
Save djleeds/5855274 to your computer and use it in GitHub Desktop.
Code samples supporting the article _"Unit Testing: What's a Unit?"_ on the *Hit the Bits!* programming blog.
public int triple(int x) {
return x * 3;
}
class Square {
int length;
public void setLength(int newLength) {
this.length = newLength;
}
public int getArea() {
return this.length * this.length;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment