"20010101235959im_/http://www.yahoo.com/",
"20010101im_/www.yahoo.com:80/");
}
public void testReplayRequestParser() throws Exception {
ReplayRequestParser parser = new ReplayRequestParser(brp);
// note AccessPoint arg is unused
{
WaybackRequest wbr = parser.parse("20100101000000/http://www.yahoo.com/", null);
assertEquals("replayTimestamp", "20100101000000", wbr.getReplayTimestamp());
assertNull("startTimestamp", wbr.getStartTimestamp());
// endTimestamp is current timestamp
assertNotNull("endTimestamp", wbr.getEndTimestamp());
}
// old Alexa ARCs has 12-digits dates - padded with "00" -> same as prev case
{
WaybackRequest wbr = parser.parse("201001010000/http://www.yahoo.com/", null);
assertEquals("replayTimestamp", "20100101000000", wbr.getReplayTimestamp());
assertNull("startTimestamp", wbr.getStartTimestamp());
// endTimestamp is current timestamp
assertNotNull("endTimestamp", wbr.getEndTimestamp());
}
{
WaybackRequest wbr = parser.parse("20100101/http://www.yahoo.com/", null);
assertEquals("replayTimestamp", "20100101235959", wbr.getReplayTimestamp());
assertEquals("startTimestamp", "20100101000000", wbr.getStartTimestamp());
assertEquals("endTimestamp", "20100101235959", wbr.getEndTimestamp());
}