Skip to content

Commit

Permalink
Exposed partialSeasonKeysForEvent when retrieving event (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
mroloux authored Nov 9, 2023
1 parent e6fbdd1 commit 31bb650
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/seatsio/events/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class Event extends ValueObject {
public Map<String, CategoryKey> objectCategories;
public List<Category> categories;
public boolean isInThePast;
public List<String> partialSeasonKeysForEvent;

public boolean isSeason() {
return false;
Expand Down
2 changes: 2 additions & 0 deletions src/test/java/seatsio/events/RetrieveEventTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public void test() {
new Category(10L, "Cat2", "#5E42ED", false),
new Category("string11", "Cat3", "#5E42BB", false)
);
assertThat(retrievedEvent.partialSeasonKeysForEvent).isNull();
}

@Test
Expand Down Expand Up @@ -70,5 +71,6 @@ public void retrieveSeason() {
new Category(10L, "Cat2", "#5E42ED", false),
new Category("string11", "Cat3", "#5E42BB", false)
);
assertThat(retrievedSeason.partialSeasonKeysForEvent).isNull();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
1 change: 1 addition & 0 deletions src/test/java/seatsio/seasons/CreatePartialSeasonTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 31bb650

Please sign in to comment.