Skip to content

Commit

Permalink
Fix summarizeFloat in Procedures2Test.
Browse files Browse the repository at this point in the history
Signed-off-by: Donald Raab <Donald.Raab@bnymellon.com>
  • Loading branch information
donraab committed Jan 22, 2018
1 parent 5d67a88 commit 727946c
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@ public void throwingWithUserSpecifiedException()
Verify.assertThrowsWithCause(
RuntimeException.class,
IOException.class,
() -> { Procedures2.throwing(
() -> Procedures2.throwing(
(one, two) -> { throw new IOException(); },
(one, two, ce) -> new RuntimeException(ce)).value(null, null); });
(one, two, ce) -> new RuntimeException(ce)).value(null, null));
Verify.assertThrowsWithCause(
MyRuntimeException.class,
IOException.class,
() -> { Procedures2.throwing(
() -> Procedures2.throwing(
(one, two) -> { throw new IOException(); },
this::throwMyException).value(null, null); });
this::throwMyException).value(null, null));
Verify.assertThrows(
NullPointerException.class,
() -> { Procedures2.throwing(
() -> Procedures2.throwing(
(one, two) -> { throw new NullPointerException(); },
this::throwMyException).value(null, null); });
this::throwMyException).value(null, null));
}

private MyRuntimeException throwMyException(Object one, Object two, Throwable exception)
Expand Down Expand Up @@ -112,7 +112,7 @@ public void summarizeFloat()
MutableMap<String, DoubleSummaryStatistics> map = list.aggregateInPlaceBy(
Object::toString,
DoubleSummaryStatistics::new,
Procedures2.summarizeDouble(Float::floatValue));
Procedures2.summarizeFloat(Float::floatValue));
Verify.assertSize(2, map);
Assert.assertEquals(6.0, map.get("2.0").getSum(), 0.0);
Assert.assertEquals(9.0, map.get("3.0").getSum(), 0.0);
Expand Down

0 comments on commit 727946c

Please sign in to comment.