* @author rfellows
*/
public class ChartLinkGeneratorTest {
@Test
public void testGenerateLinkEscapingSingleQuotes() {
ChartLinkGenerator g = new ChartLinkGenerator( "javascript:test('{series}', '{domain}')" );
String generated =
g.generateLink( "1950's Chicago Surface Lines Streetcar", "1950's Chicago Surface Lines Streetcar", 8601 );
assertEquals(
"javascript:test('1950\\'s Chicago Surface Lines Streetcar', '1950\\'s Chicago Surface Lines Streetcar')",
generated );
generated = g.generateLink( "1950's Chicago Surface Lines Streetcar", 3, 8601 );
assertEquals( "javascript:test('1950\\'s Chicago Surface Lines Streetcar', '3')", generated );
}