Reformatted some statements

This commit is contained in:
Zeger Hendrikse 2017-01-22 15:13:05 +01:00
parent 29825bf89a
commit 31cd77375a
1 changed files with 12 additions and 4 deletions

View File

@ -104,8 +104,12 @@ public class GuavaRangeMapTest {
@Test
public void givenImmutableRangeMap_whenQueryWithinRange_returnsSucessfully() {
final RangeMap<Integer, String> experienceRangeDesignationMap = ImmutableRangeMap.<Integer, String> builder().put(Range.closed(0, 2), "Associate").put(Range.closed(3, 5), "Senior Associate").put(Range.closed(6, 8), "Vice President")
.put(Range.closed(9, 15), "Executive Director").put(Range.closed(16, 30), "Managing Director").build();
final RangeMap<Integer, String> experienceRangeDesignationMap = ImmutableRangeMap.<Integer, String> builder()
.put(Range.closed(0, 2), "Associate")
.put(Range.closed(3, 5), "Senior Associate")
.put(Range.closed(6, 8), "Vice President")
.put(Range.closed(9, 15), "Executive Director")
.put(Range.closed(16, 30), "Managing Director").build();
assertEquals("Vice President", experienceRangeDesignationMap.get(6));
assertEquals("Executive Director", experienceRangeDesignationMap.get(15));
@ -113,8 +117,12 @@ public class GuavaRangeMapTest {
@Test(expected = IllegalArgumentException.class)
public void givenImmutableRangeMap_whenRangeOverlaps_ThrowsException() {
ImmutableRangeMap.<Integer, String> builder().put(Range.closed(0, 2), "Associate").put(Range.closed(3, 5), "Senior Associate").put(Range.closed(6, 8), "Vice President")
.put(Range.closed(8, 15), "Executive Director").put(Range.closed(16, 30), "Managing Director").build();
ImmutableRangeMap.<Integer, String> builder()
.put(Range.closed(0, 2), "Associate")
.put(Range.closed(3, 5), "Senior Associate")
.put(Range.closed(6, 8), "Vice President")
.put(Range.closed(8, 15), "Executive Director")
.put(Range.closed(16, 30), "Managing Director").build();
}
}