fixed special case of position

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@121 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach 2010-09-01 09:18:41 +00:00
parent 9458f487bf
commit 4f174fe3f9
2 changed files with 24 additions and 3 deletions

View file

@ -29,7 +29,7 @@ import org.junit.Test;
public class BahnProviderTest
{
@Test
public void uebergang()
public void connectionUebergang()
{
assertFineConnectionDetails("<span class=\"bold\">Berlin Hbf</span><br />\n" //
+ "&#220;bergang\n" //
@ -37,10 +37,29 @@ public class BahnProviderTest
+ "<span class=\"bold\">Berlin-Lichtenberg</span><br />");
}
@Test
public void departureWithPlatform()
{
assertFineDepartures("<a href=\"http://mobile.bahn.de/bin/mobil/traininfo.exe/dox/731061/244203/590672/51649/80/si=8100352&amp;bt=dep&amp;ti=10:42&amp;pt=10:42&amp;p=1111111111&amp;date=01.09.10&amp;max=10&amp;rt=1&amp;&amp;\">\n" //
+ "<span class=\"bold\">S 1</span>\n" //
+ "</a>\n" //
+ "&gt;&gt;\n" //
+ "G&#228;nserndorf\n" //
+ "<br />\n" //
+ "<span class=\"bold\">10:42</span>Gl. 1");
}
private void assertFineConnectionDetails(String s)
{
Matcher m = BahnProvider.P_CONNECTION_DETAILS_FINE.matcher(s);
assertTrue(m.matches());
// ParserUtils.printGroups(m);
}
private void assertFineDepartures(String s)
{
Matcher m = BahnProvider.P_DEPARTURES_FINE.matcher(s);
assertTrue(m.matches());
// ParserUtils.printGroups(m);
}
}