Orbit TV Times: library descriptions, more room, masthead fits phones (0.110.3)
Paul, 8 November 2026: the stock reasons ('An evening film on a film channel') are replaced by each programme's own
words from the library: a short tagline, else the synopsis's first sentence, with a film's two leads (one request
per edition for new items, cached). Each listing is its own card with more space; the masthead's titles have a fixed
width so a phone's serif can't push 'TV Times' off the edge.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package tv.orbit.classic
|
||||
|
||||
import org.junit.Assert.*
|
||||
import org.junit.Test
|
||||
|
||||
/** 8 November 2026: Orbit TV Times describes programmes in the library's own words, briefly. */
|
||||
class TimesBlurbTest {
|
||||
@Test fun aShortTaglineWinsWithTheLeads() {
|
||||
assertEquals("Long live the king. With Chadwick Boseman and Michael B. Jordan.",
|
||||
timesBlurb("Long live the king.", "T'Challa returns home to Wakanda to take his rightful place as king. More text.", listOf("Chadwick Boseman", "Michael B. Jordan"), "Movie"))
|
||||
}
|
||||
@Test fun otherwiseTheSynopsisFirstSentence() {
|
||||
assertEquals("Del and Rodney take on a job restoring a chandelier.",
|
||||
timesBlurb(null, "Del and Rodney take on a job restoring a chandelier. It doesn't go well.", emptyList(), "Episode"))
|
||||
}
|
||||
@Test fun longTextIsCutAtAWord() {
|
||||
val b = timesBlurb(null, "word ".repeat(80), emptyList(), "Episode")!!
|
||||
assertTrue(b.length <= TIMES_BLURB_MAX + 1); assertTrue(b.endsWith("…"))
|
||||
}
|
||||
@Test fun nothingToSayStaysEmpty() {
|
||||
assertNull(timesBlurb(null, "", emptyList(), "Episode"))
|
||||
assertEquals("Starring Bill Murray.", timesBlurb("", null, listOf("Bill Murray"), "Movie"))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user