Created
August 23, 2011 23:36
-
-
Save runeflobakk/1166921 to your computer and use it in GitHub Desktop.
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
private Person per = new Person("Per", new Address("A-gate 5", "0560", "Oslo"), 30); | |
private Person kari = new Person("Kari", new Address("B-gate 4", "0560", "Oslo"), 37); | |
@Test | |
public void knowsWhichRelativesLivingInTheSamePostalCode() { | |
per.relateTo(SIBLING, kari); | |
Collection<Relative> nearbyRelatives = per.getRelativesWithSamePostalCode(); | |
assertThat(nearbyRelatives, hasSize(1)); | |
Relative nearbyRelative = nearbyRelatives.iterator().next(); | |
assertThat(nearbyRelative.person, is(kari)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment