Created
October 16, 2013 20:10
-
-
Save eoftedal/7013975 to your computer and use it in GitHub Desktop.
DI-løs, men likevel testbar kode
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 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