diff --git a/src/main/java/seatsio/events/Event.java b/src/main/java/seatsio/events/Event.java index 7b9afca..509d354 100644 --- a/src/main/java/seatsio/events/Event.java +++ b/src/main/java/seatsio/events/Event.java @@ -34,6 +34,7 @@ public class Event extends ValueObject { public Map objectCategories; public List categories; public boolean isInThePast; + public List partialSeasonKeysForEvent; public boolean isSeason() { return false; diff --git a/src/test/java/seatsio/events/RetrieveEventTest.java b/src/test/java/seatsio/events/RetrieveEventTest.java index 565ef5f..104d049 100644 --- a/src/test/java/seatsio/events/RetrieveEventTest.java +++ b/src/test/java/seatsio/events/RetrieveEventTest.java @@ -37,6 +37,7 @@ public void test() { new Category(10L, "Cat2", "#5E42ED", false), new Category("string11", "Cat3", "#5E42BB", false) ); + assertThat(retrievedEvent.partialSeasonKeysForEvent).isNull(); } @Test @@ -70,5 +71,6 @@ public void retrieveSeason() { new Category(10L, "Cat2", "#5E42ED", false), new Category("string11", "Cat3", "#5E42BB", false) ); + assertThat(retrievedSeason.partialSeasonKeysForEvent).isNull(); } } diff --git a/src/test/java/seatsio/seasons/AddEventsToPartialSeasonTest.java b/src/test/java/seatsio/seasons/AddEventsToPartialSeasonTest.java index 5cc09c4..0119228 100644 --- a/src/test/java/seatsio/seasons/AddEventsToPartialSeasonTest.java +++ b/src/test/java/seatsio/seasons/AddEventsToPartialSeasonTest.java @@ -19,5 +19,6 @@ public void test() { assertThat(updatedPartialSeason.events) .extracting(s -> s.key) .containsExactly("event1", "event2"); + assertThat(updatedPartialSeason.events.get(0).partialSeasonKeysForEvent).containsExactly("aPartialSeason"); } } diff --git a/src/test/java/seatsio/seasons/CreatePartialSeasonTest.java b/src/test/java/seatsio/seasons/CreatePartialSeasonTest.java index 0b8d299..0ef1450 100644 --- a/src/test/java/seatsio/seasons/CreatePartialSeasonTest.java +++ b/src/test/java/seatsio/seasons/CreatePartialSeasonTest.java @@ -32,5 +32,6 @@ public void eventKeysCanBePassedIn() { Season season = client.seasons.createPartialSeason(topLevelSeason.key, null, newArrayList("event1", "event3")); assertThat(season.events).extracting(event -> event.key).containsExactly("event1", "event3"); + assertThat(season.events.get(0).partialSeasonKeysForEvent).containsExactly(season.key); } }