public class SpecReader extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
SpecReader.State |
| Modifier and Type | Field and Description |
|---|---|
protected StringBuilder |
ast |
protected StringBuilder |
comment |
protected int |
contentLineNumber |
static String |
EXAMPLE_BREAK |
static String |
EXAMPLE_KEYWORD |
static String |
EXAMPLE_START |
static String |
EXAMPLE_START_NBSP |
static String |
EXAMPLE_TEST_BREAK |
static String |
EXAMPLE_TEST_START |
protected int |
exampleNumber |
protected List<SpecExample> |
examples |
protected String |
fileUrl |
protected StringBuilder |
html |
protected InputStream |
inputStream |
protected int |
lineNumber |
static String |
OPTIONS_KEYWORD |
static Pattern |
OPTIONS_PATTERN |
static String |
OPTIONS_STRING |
protected String |
optionsSet |
protected String |
section |
protected static Pattern |
SECTION_PATTERN |
protected StringBuilder |
source |
protected SpecReader.State |
state |
static String |
TYPE_BREAK |
static String |
TYPE_TEST_BREAK |
| Modifier | Constructor and Description |
|---|---|
protected |
SpecReader(InputStream stream,
String fileUrl) |
public static final String EXAMPLE_KEYWORD
public static final String EXAMPLE_BREAK
public static final String EXAMPLE_START
public static final String EXAMPLE_START_NBSP
public static final String EXAMPLE_TEST_BREAK
public static final String EXAMPLE_TEST_START
public static final String OPTIONS_KEYWORD
public static final String OPTIONS_STRING
public static final Pattern OPTIONS_PATTERN
public static final String TYPE_BREAK
public static final String TYPE_TEST_BREAK
protected static final Pattern SECTION_PATTERN
protected final InputStream inputStream
protected SpecReader.State state
protected String section
protected String optionsSet
protected StringBuilder source
protected StringBuilder html
protected StringBuilder ast
protected StringBuilder comment
protected int exampleNumber
protected final String fileUrl
protected int lineNumber
protected int contentLineNumber
protected List<SpecExample> examples
protected SpecReader(InputStream stream, String fileUrl)
public static List<SpecExample> readExamples()
public static List<SpecExample> readExamples(String specResource)
public static List<SpecExample> readExamples(String specResource, String urlString)
public static SpecReader createAndReadExamples(String specResource, SpecReaderFactory readerFactory)
public static SpecReader createAndReadExamples(String specResource, SpecReaderFactory readerFactory, String urlString)
public static List<SpecExample> readExamples(String specResource, SpecReaderFactory readerFactory)
public static List<SpecExample> readExamples(String specResource, SpecReaderFactory readerFactory, String urlString)
public static List<String> readExamplesAsString(String specResource, SpecReaderFactory readerFactory)
public static String readSpec()
public static InputStream getSpecInputStream()
public static InputStream getSpecInputStream(String specResource)
protected List<SpecExample> read() throws IOException
IOExceptionprotected void addSpecLine(String line)
protected void addSpecExample(SpecExample example)
public UrlString getFileUrl()
protected void processLine(String line)
protected void resetContents()
Copyright © 2019. All rights reserved.