mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-07 05:38:47 +00:00
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:
parent
9458f487bf
commit
4f174fe3f9
2 changed files with 24 additions and 3 deletions
|
@ -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" //
|
||||
+ "Ü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&bt=dep&ti=10:42&pt=10:42&p=1111111111&date=01.09.10&max=10&rt=1&&\">\n" //
|
||||
+ "<span class=\"bold\">S 1</span>\n" //
|
||||
+ "</a>\n" //
|
||||
+ ">>\n" //
|
||||
+ "Gä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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue