Skip to content

Instantly share code, notes, and snippets.



Created Dec 21, 2018
What would you like to do?
Introductory example of a pseudo-tested method
class VList {
private List elements;
private int version;
public void add(Object item) {
private void incrementVersion() { // This method is pseudo-tested
public int size() {
return elements.size();
class VListTest {
public void testAdd() {
VList l = new VList();
l.add(1); // This line touches the add and the incrementVersion methods
assertEquals(l.size(), 1); // This line touches the size method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.