public void OfdbSearchTitleReferenceResolverTest_2() { var input = XPathHelper.EscapeJavaScript(searchResultString2); var expected = "161764"; var SUT = new OfdbSearchTitleReferenceResolver(); var actual = SUT.Resolve(input); Assert.Equal(expected, actual); }
public void OfdbSearchTitleTitleResolverTest_2() { var input = XPathHelper.EscapeJavaScript(searchResultString2); var expected = "Fast & Furious - Neues Modell. Originalteile."; var SUT = new OfdbSearchTitleTitleResolver(); var actual = SUT.Resolve(searchResultString2); Assert.Equal(expected, actual); }
public void EscapeJavaScriptTest() { //var input = "<a href=\"film/257582,Der-Kreis\" onmouseover=\"Tip('<img src="images/film/na.gif" width="120" height="168">',SHADOW,true)\">Kreis, Der<font size=\"1\"> / Kreis, Der</font> (1964)</a>"; var input = searchResultString; var expected = "<a href=\"film/257582,Der-Kreis\" onmouseover=\"Tip('<img src="images/film/na.gif" width="120" height="168">',SHADOW,true)\">Kreis, Der<font size=\"1\"> / Kreis, Der</font> (1964)</a>"; var actual = XPathHelper.EscapeJavaScript(input); Assert.Equal(expected, actual); }
public void OfdbSearchTitleReferenceYearTest_2() { //var input = "<a href=\"film/257582,Der-Kreis\" onmouseover=\"Tip('<img src=&quot;images/film/na.gif&quot; width=&quot;120&quot; height=&quot;168&quot;>',SHADOW,true)\">Kreis, Der<font size=\"1\"> / Kreis, Der</font> (1964)</a>"; var input = XPathHelper.EscapeJavaScript(searchResultString2); var expected = "2009"; var SUT = new OfdbSearchTitleYearResolver(); var actual = SUT.Resolve(input); Assert.Equal(expected, actual); }
public void OfdbBarcodeSearchReferenceResolverTest() { var input = "<a href=\"view.php?page=fassung&fid=268777&vid=396788\" onmouseover=\"Tip('<img src="images/fassung/396/396788_f.jpg" width="220" height="255">',SHADOW,true)\">Blu-ray Disc: Warner Home (Deutschland), FSK 12</a>"; input = XPathHelper.EscapeJavaScript(input); var expected = "268777;396788"; var SUT = new OfdbBarcodeSearchReferenceResolver(); var actual = SUT.Resolve(input); Assert.Equal(expected, actual); }
public void OfdbDetailsCoverImageResolverTest() { var input = "<img src=\"images/film/258/258134.jpg\" alt=\"Bestimmung - Divergent, Die Poster\" border=\"0\" width=\"120\" height=\"170\" itemprop=\"image\">"; input = XPathHelper.EscapeJavaScript(input); var expected = "https://ofdb.de/images/film/258/258134.jpg"; var SUT = new OfdbParser.OfdbResolvers.OfdbDetailsCoverImageResolver(); var actual = SUT.Resolve(input); Assert.Equal(expected, actual); }
public void OfdbDetailsPlotLinkResolverTest() { var input = "<a href=\"plot/258134,619306,Die-Bestimmung---Divergent\"><b>[mehr]</b></a>"; input = XPathHelper.EscapeJavaScript(input); var expected = "https://ofdb.de/plot/258134,619306,Die-Bestimmung---Divergent"; var SUT = new OfdbParser.OfdbResolvers.OfdbDetailsPlotLinkResolver(); var actual = SUT.Resolve(input); Assert.Equal(expected, actual); }