Skip to content

Instantly share code, notes, and snippets.

@eoftedal
Created October 16, 2013 20:10
Show Gist options
  • Save eoftedal/7013975 to your computer and use it in GitHub Desktop.
Save eoftedal/7013975 to your computer and use it in GitHub Desktop.
DI-løs, men likevel testbar kode
public class Dog {
private Tail tail;
private Head head;
public Dog() {
this(new TailImpl(), new HeadImpl())
}
public Dog(Tail tail, Head head) {
this.tail = tail;
this.head = head;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment