Skip to content

Commit 50bb9a6

Browse files
committed
Missing depdnency.
1 parent 8493d9a commit 50bb9a6

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

media-domain/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,11 @@
245245
<groupId>nl.vpro.shared</groupId>
246246
<artifactId>vpro-shared-i18n</artifactId>
247247
</dependency>
248+
<dependency>
249+
<groupId>org.meeuw.math</groupId>
250+
<artifactId>mihxil-theories</artifactId>
251+
<scope>test</scope>
252+
</dependency>
248253

249254
</dependencies>
250255
<profiles>

media-domain/src/test/java/nl/vpro/domain/media/ProgramTest.java

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88

99
import org.junit.jupiter.api.Test;
1010

11+
import com.fasterxml.jackson.core.JsonProcessingException;
12+
1113
import nl.vpro.domain.media.exceptions.CircularReferenceException;
14+
import nl.vpro.jackson2.Jackson2Mapper;
1215

1316
import static org.assertj.core.api.Assertions.assertThat;
1417
import static org.assertj.core.api.Assertions.assertThatThrownBy;
@@ -68,4 +71,52 @@ public void testCreateEpisodeOfWhenCircular() {
6871
program.createEpisodeOf(group, 1, null);
6972
}).isInstanceOf(CircularReferenceException.class);
7073
}
74+
75+
@Test
76+
public void moveEvent() throws JsonProcessingException {
77+
Program p = new Program();
78+
p.setMid("POW_05759681");
79+
ScheduleEvent s = Jackson2Mapper.getLenientInstance().readValue(
80+
"""
81+
{
82+
"channel": "NED1",
83+
"start": 1733763600000,
84+
"guideDay": 1733698800000,
85+
"duration": 900000,
86+
"midRef": "POW_05759681",
87+
"poProgID": "POW_05759681",
88+
"textSubtitles": "Teletekst ondertitels",
89+
"rerun": false,
90+
"imi": "imi:1612093401",
91+
"urnRef": "crid://media-press.tv/394635384",
92+
"eventStart": 1733763600000
93+
}\
94+
""", ScheduleEvent.class);
95+
p.addScheduleEvent(s);
96+
Program p2 = new Program();
97+
p2.setMid("POW_05759681");
98+
99+
ScheduleEvent s2 = Jackson2Mapper.getLenientInstance().readValue(
100+
"""
101+
{
102+
"channel": "BVNT",
103+
"start": 1733763600000,
104+
"guideDay": 1733698800000,
105+
"duration": 900000,
106+
"midRef": "POW_05759681",
107+
"poProgID": "POW_05759681",
108+
"textSubtitles": "Teletekst ondertitels",
109+
"rerun": false,
110+
"imi": "imi:1612093401",
111+
"urnRef": "crid://media-press.tv/394635384",
112+
"eventStart": 1733763600000
113+
}\
114+
""", ScheduleEvent.class);
115+
s2.setParent(p2);
116+
117+
s2.setParent(p);
118+
assertThat(p.getScheduleEvents()).hasSize(2);
119+
120+
121+
}
71122
}

0 commit comments

Comments
 (0)