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 JazzBandTest { | |
@Test | |
public void bandCreatesMusicianWithAccessToBandSetList() { | |
List setList = Arrays.asList("Donna Lee", "Dig"); | |
JazzBand theBop5 = new JazzBand(setList); | |
JazzBand.Musician tom = theBop5.createMusician(); | |
assertTrue(setList == tom.getBandSetList()); | |
} | |
} | |
public class JazzBand { | |
private List setList; | |
public JazzBand(List setList) { | |
this.setList = setList; | |
} | |
public Musician createMusician() { | |
return new Musician(); | |
} | |
public class Musician { | |
private Musician() {} | |
public List getBandSetList() { | |
return setList; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment