0.99.1: the library's exact names beside listed titles that it holds under another name (no substitution)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
package tv.orbit.classic
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
|
||||
/** 0.99.1: the library's exact names for listed shows and films, added beside the originals, each placed exactly as its original. */
|
||||
class CatalogueNamesTest {
|
||||
private val added = mapOf(
|
||||
202 to listOf("Cosmos: A Spacetime Odyssey" to "Cosmos (2014)", "Civilizations" to "Civilisations (2018)", "The Vietnam War" to "The Vietnam War (2017)",
|
||||
"Parts Unknown" to "Anthony Bourdain: Parts Unknown", "Michael Palin's Himalaya" to "Himalaya with Michael Palin", "Pole to Pole" to "Pole to Pole with Michael Palin",
|
||||
"Ancient Apocalypse" to "Ancient Apocalypse (2022)"),
|
||||
204 to listOf("The Staircase" to "The Staircase (2004)", "Homicide Hunter" to "Homicide Hunter: Lt. Joe Kenda", "My Ghost Story" to "My Ghost Story: Caught on Camera",
|
||||
"Crime Scene: The Vanishing at the Cecil Hotel" to "Crime Scene"),
|
||||
601 to listOf("Tenchi Universe" to "Tenchi Muyo! Tenchi Universe"),
|
||||
611 to listOf("Bluey" to "Bluey (2018)", "Noddy" to "Noddy's Toyland Adventures"),
|
||||
303 to listOf("Alien 3" to "Alien³ (1992)"),
|
||||
612 to listOf("The Secret World of Arrietty" to "Arrietty (2010)", "The Tale of Princess Kaguya" to "The Tale of The Princess Kaguya"))
|
||||
|
||||
@Test fun eachLibraryNameSitsBesideItsOriginalAndIsPlacedTheSame() {
|
||||
for ((number, pairs) in added) {
|
||||
val p = SmartChannels.first { it.number == number }
|
||||
for ((original, library) in pairs) {
|
||||
assertTrue("$number keeps $original", original in p.searches)
|
||||
assertTrue("$number reads $library", library in p.searches)
|
||||
// Every block, event and order setting that names the original names the library's title too.
|
||||
p.dayParts.forEach { part -> assertEquals("$number ${part.fromHour}-${part.toHour}: $library", original in part.titles, library in part.titles) }
|
||||
assertEquals("$number mixes $library as $original", p.mixes(PoolSeries("a", original, emptyList())), p.mixes(PoolSeries("b", library, emptyList())))
|
||||
assertEquals("$number tier of $library", p.weightOf(PoolSeries("a", original, emptyList())), p.weightOf(PoolSeries("b", library, emptyList())), 0.0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun matchingStaysExact() {
|
||||
// Nothing is substituted: a different title still doesn't match, and the film names carry their year.
|
||||
assertTrue(seriesKey("Cosmos (2014)") != seriesKey("Cosmos"))
|
||||
assertEquals(1992, FilmIdentity.of("Alien³ (1992)").year)
|
||||
assertEquals(2010, FilmIdentity.of("Arrietty (2010)").year)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user