use of org.atlasapi.content.SeriesRef in project atlas-deer by atlasapi.
the class CqlContentGenerator method makeBrand.
private static Brand makeBrand() {
Brand brand = new Brand();
setContainerFields(brand);
brand.setSeriesRefs(ImmutableList.of(new SeriesRef(Id.valueOf(2322), Publisher.C4, "title", 32, DateTime.now(DateTimeZone.UTC), 2015, ImmutableList.of(new Certificate("some kind of class", Countries.FR)))));
return brand;
}
use of org.atlasapi.content.SeriesRef in project atlas-deer by atlasapi.
the class ItemDisplayTitleWriterTest method testEpisodeWithoutContainerButWithSeriesIsHandledGracefully.
// This should never happen
@Test
public void testEpisodeWithoutContainerButWithSeriesIsHandledGracefully() throws Exception {
Episode entity = new Episode();
entity.setSpecial(false);
entity.setContainerSummary(null);
entity.setSeriesRef(new SeriesRef(Id.valueOf(1L), Publisher.METABROADCAST, "Series Title", 24, new DateTime(), null, null));
entity.setEpisodeNumber(42);
entity.setTitle("Sausages");
titleWriter.write(entity, fieldWriter, outputContext);
verifyTitle("Sausages");
verifySubtitle(null);
}
use of org.atlasapi.content.SeriesRef in project atlas-deer by atlasapi.
the class ItemDisplayTitleWriterTest method testEpisodeWithContainerAndSeriesWithTitleAndTitleAndEpisodeNumberHasContainerTitleAndSeriesPrefixedSubtitle.
@Test
public void testEpisodeWithContainerAndSeriesWithTitleAndTitleAndEpisodeNumberHasContainerTitleAndSeriesPrefixedSubtitle() throws Exception {
Episode entity = new Episode();
entity.setSpecial(false);
entity.setContainerSummary(ContainerSummary.create("brand", "Brand Title", "Brand Desc", null, null));
entity.setSeriesRef(new SeriesRef(Id.valueOf(1L), Publisher.METABROADCAST, "Series Title", 24, new DateTime(), null, null));
entity.setEpisodeNumber(42);
entity.setTitle("Sausages");
titleWriter.write(entity, fieldWriter, outputContext);
verifyTitle(entity.getContainerSummary().getTitle());
verifySubtitle("Series Title, Episode 42: Sausages");
}
use of org.atlasapi.content.SeriesRef in project atlas-deer by atlasapi.
the class ItemDisplayTitleWriterTest method testEpisodeWithContainerAndSeriesWithNumberAndTitleAndEpisodeNumberHasContainerTitleAndSeriesNumberPrefixedSubtitle.
@Test
public void testEpisodeWithContainerAndSeriesWithNumberAndTitleAndEpisodeNumberHasContainerTitleAndSeriesNumberPrefixedSubtitle() throws Exception {
Episode entity = new Episode();
entity.setSpecial(false);
entity.setContainerSummary(ContainerSummary.create("brand", "Brand Title", "Brand Desc", null, null));
entity.setSeriesRef(new SeriesRef(Id.valueOf(1L), Publisher.METABROADCAST, null, 24, new DateTime(), null, null));
entity.setEpisodeNumber(42);
entity.setTitle("Sausages");
titleWriter.write(entity, fieldWriter, outputContext);
verifyTitle(entity.getContainerSummary().getTitle());
verifySubtitle("Series 24, Episode 42: Sausages");
}
use of org.atlasapi.content.SeriesRef in project atlas-deer by atlasapi.
the class ItemDisplayTitleWriterTest method testEpisodeWithPartTitle.
@Test
public void testEpisodeWithPartTitle() throws Exception {
Episode entity = new Episode();
entity.setSpecial(false);
entity.setContainerSummary(ContainerSummary.create("brand", "Silent Witness", "Shhh", null, null));
entity.setSeriesRef(new SeriesRef(Id.valueOf(1L), Publisher.METABROADCAST, "Series 17", 17, new DateTime(), null, null));
entity.setEpisodeNumber(5);
entity.setTitle("Fraternity Part 2");
titleWriter.write(entity, fieldWriter, outputContext);
verifyTitle("Silent Witness");
verifySubtitle("Series 17, Episode 5: Fraternity Part 2");
}
Aggregations