Skip to content

Instantly share code, notes, and snippets.

@igormukhin
Created May 8, 2018 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save igormukhin/e00adac1e024848be172dfe851f4eca7 to your computer and use it in GitHub Desktop.
Save igormukhin/e00adac1e024848be172dfe851f4eca7 to your computer and use it in GitHub Desktop.
package de.wirthedv.tools.developer.interview;
import static org.junit.Assert.assertEquals;
import java.util.Calendar;
import org.junit.Test;
public class TestYearMonth {
@Test
public void testAddFourMonths() {
YearMonth now = new YearMonth(2013, Calendar.NOVEMBER);
// test
YearMonth later = now.plusMonths(4);
YearMonth expectedLater = new YearMonth(2014, Calendar.MARCH);
assertEquals(expectedLater, later);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment