Last active
December 18, 2015 22:29
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public int triple(int x) { | |
return x * 3; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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