MonTest: apply stepdown rule to methods

This commit is contained in:
Paul Campbell 2017-09-19 23:09:28 +01:00
parent 732c4f5206
commit ccf3a11157

View file

@ -18,6 +18,13 @@ public class MonTest {
assertMonContains(wrap, "test");
}
private <T> void assertMonContains(
final Mon<T> wrap,
final T expected
) {
wrap.map(value -> assertThat(value).isEqualTo(expected));
}
@Test
public void canMap() {
//given
@ -144,8 +151,4 @@ public class MonTest {
assertThat(one).isNotEqualTo(notAMon);
assertThat(one).isNotEqualTo(null);
}
private <T> void assertMonContains(final Mon<T> wrap, final T expected) {
wrap.map(value -> assertThat(value).isEqualTo(expected));
}
}