cucumber.runtime.snippets
Interface Snippet


public interface Snippet


Method Summary
 String arguments(List<Class<?>> argumentTypes)
           
 String escapePattern(String pattern)
           
 String namedGroupEnd()
          Langauges that don't support named capture groups should return null.
 String namedGroupStart()
          Langauges that don't support named capture groups should return null.
 String tableHint()
           
 String template()
           
 

Method Detail

template

String template()
Returns:
a MessageFormat template used to generate a snippet. The template can access the following variables:


tableHint

String tableHint()
Returns:
a hint about alternative ways to declare a table argument

arguments

String arguments(List<Class<?>> argumentTypes)
Parameters:
argumentTypes - the types the snippet's argument should accept
Returns:
a string representation of the arguments

namedGroupStart

String namedGroupStart()
Langauges that don't support named capture groups should return null.

Returns:
the start of a named capture group

namedGroupEnd

String namedGroupEnd()
Langauges that don't support named capture groups should return null.

Returns:
the end of a named capture group

escapePattern

String escapePattern(String pattern)
Parameters:
pattern - the computed pattern that will match an undefined step
Returns:
an escaped representation of the pattern, if escaping is necessary.


Copyright © 2012. All Rights Reserved.