-
-
Save kikers25/d082ae9829e20113a0b9c704b102d3dc to your computer and use it in GitHub Desktop.
Unit tests with dates 2
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 void mutability() throws Exception { | |
User user = new User().setDateOfBirth(new Date(1990, 1, 1)); | |
Date date = user.getDateOfBirth(); | |
date.setYear(2014); | |
assertThat(user.getDateOfBirth(), is(new Date(2014, 1, 1))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment