From 1046b6c5ae179850237bbafdcf54c948a1ec0dc0 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 30 Sep 2017 16:46:49 +0100 Subject: [PATCH] entities: add static builder and constructors and make previous revision Optional --- src/test/java/net/kemitix/mon/IdentityTest.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/test/java/net/kemitix/mon/IdentityTest.java b/src/test/java/net/kemitix/mon/IdentityTest.java index 5a1b3f3..513a979 100644 --- a/src/test/java/net/kemitix/mon/IdentityTest.java +++ b/src/test/java/net/kemitix/mon/IdentityTest.java @@ -10,6 +10,15 @@ import org.junit.Test; */ public class IdentityTest implements WithAssertions { + @Test + public void functorLawMapIdEqualsId() { + //given + final String id = "id"; + //when + + //then + } + @Test public void canMapIdentityFromStringToInteger() { //given @@ -20,6 +29,10 @@ public class IdentityTest implements WithAssertions { assertIdentityContains(idInt, 3); } + private void assertIdentityContains(final Identity identity, final T expected) { + identity.map(id -> assertThat(id).isEqualTo(expected)); + } + @Test public void canFluentlyComposeFunctions() { //given @@ -34,8 +47,4 @@ public class IdentityTest implements WithAssertions { assertIdentityContains(idBytes, "par".getBytes()); } - private void assertIdentityContains(final Identity identity, final T expected) { - identity.map(id -> assertThat(id).isEqualTo(expected)); - } - }