...
- Implement the SpecificationDialect interface
- Add your implementation in the classpath when running the specification Test and Add the --dialect option when running the specification.
Implement the SpecificationDialect interface.
The interface defines a method that should take the Specification as a String and convert it to an HTML page (with the <html> tag).
Code Block | ||
---|---|---|
| ||
package com.greenpepper.dialect; /** * Define a way to convert an input to the HTML output that will be fed to Greenpepper. */ public interface SpecificationDialect { /** * Converts the content of an input to the HTML output that will be fed to GreenPepper Core * @param input The input content to convert. * @return The HTML output. */ String convert(StringInputStream input) throws SpecificationDialectException; } |
...
Tip |
---|
You can create a constructor that takes arguments, the arguments being an array of String. See the --dialect option to see how the option can be passed down. |
Specify the --dialect option
Use the --dialect to specify the class implementing the Dialect and its arguments
...