Documentation ¶
Index ¶
- Constants
- func ConvertToProtoItem(item Item) *gauge_messages.ProtoItem
- func ConvertToProtoSpec(spec *Specification) *gauge_messages.ProtoSpec
- func ConvertToProtoStepValue(stepValue *StepValue) *gauge_messages.ProtoStepValue
- func ConvertToProtoSuiteResult(suiteResult *result.SuiteResult) *gauge_messages.ProtoSuiteResult
- func ConvertToStepText(fragments []*gauge_messages.Fragment) string
- func CreateConceptsDictionary(shouldIgnoreErrors bool) (*ConceptDictionary, *ParseResult)
- func FindSpecs(specSource string, conceptDictionary *ConceptDictionary) ([]*Specification, []*ParseResult)
- func GetUnescapedString(string1 string) string
- func HandleParseResult(results ...*ParseResult)
- func NewProtoScenario(scenario *Scenario) *gauge_messages.ProtoScenario
- func NewSpecResult(specification *Specification) *result.SpecResult
- func ParseSpecFiles(specFiles []string, conceptDictionary *ConceptDictionary) ([]*Specification, []*ParseResult)
- func PopulateConceptDynamicParams(concept *Step, dataTableLookup *ArgLookup)
- type ArgLookup
- type ArgType
- type ByLineNo
- type Comment
- type Concept
- type ConceptDictionary
- type ConceptParser
- type DataTable
- type Heading
- type HeadingType
- type Item
- type ParamResolver
- type ParseDetailResult
- type ParseError
- type ParseResult
- type Scenario
- type ScenarioTraverser
- type SpecItemFilter
- type SpecParser
- func (specParser *SpecParser) CreateSpecification(tokens []*Token, conceptDictionary *ConceptDictionary) (*Specification, *ParseResult)
- func (parser *SpecParser) GenerateTokens(specText string) ([]*Token, *ParseError)
- func (parser *SpecParser) Parse(specText string, conceptDictionary *ConceptDictionary) (*Specification, *ParseResult)
- type SpecTraverser
- type Specification
- func (spec *Specification) CreateStepUsingLookup(stepToken *Token, lookup *ArgLookup) (*Step, *ParseDetailResult)
- func (spec *Specification) Filter(filter SpecItemFilter)
- func (specification *Specification) GetSpecItems() []Item
- func (spec *Specification) RenameSteps(oldStep Step, newStep Step, orderMap map[int]int) bool
- func (spec *Specification) Traverse(traverser SpecTraverser)
- type Step
- type StepArg
- type StepValue
- type Table
- func (table *Table) AddHeaders(columnNames []string)
- func (table *Table) AddRowValues(rowValues []string)
- func (table *Table) Get(header string) []TableCell
- func (table *Table) GetDynamicArgs() []string
- func (table *Table) GetRowCount() int
- func (table *Table) IsInitialized() bool
- func (table *Table) Kind() TokenKind
- func (table *Table) Rows() [][]string
- func (table *Table) String() string
- type TableCell
- type Tags
- type TearDown
- type Token
- type TokenKind
- type Warning
Constants ¶
View Source
const ( SpecHeading = 0 ScenarioHeading = 1 )
Variables ¶
This section is empty.
Functions ¶
func ConvertToProtoItem ¶
func ConvertToProtoItem(item Item) *gauge_messages.ProtoItem
func ConvertToProtoSpec ¶
func ConvertToProtoSpec(spec *Specification) *gauge_messages.ProtoSpec
func ConvertToProtoStepValue ¶
func ConvertToProtoStepValue(stepValue *StepValue) *gauge_messages.ProtoStepValue
func ConvertToProtoSuiteResult ¶
func ConvertToProtoSuiteResult(suiteResult *result.SuiteResult) *gauge_messages.ProtoSuiteResult
func ConvertToStepText ¶
func ConvertToStepText(fragments []*gauge_messages.Fragment) string
func CreateConceptsDictionary ¶
func CreateConceptsDictionary(shouldIgnoreErrors bool) (*ConceptDictionary, *ParseResult)
func FindSpecs ¶
func FindSpecs(specSource string, conceptDictionary *ConceptDictionary) ([]*Specification, []*ParseResult)
func GetUnescapedString ¶
func HandleParseResult ¶
func HandleParseResult(results ...*ParseResult)
func NewProtoScenario ¶
func NewProtoScenario(scenario *Scenario) *gauge_messages.ProtoScenario
func NewSpecResult ¶
func NewSpecResult(specification *Specification) *result.SpecResult
func ParseSpecFiles ¶
func ParseSpecFiles(specFiles []string, conceptDictionary *ConceptDictionary) ([]*Specification, []*ParseResult)
func PopulateConceptDynamicParams ¶
Creating a copy of the lookup and populating table values
Types ¶
type ArgLookup ¶
type ArgLookup struct {
// contains filtered or unexported fields
}
func (*ArgLookup) FromDataTableRow ¶
type ConceptDictionary ¶
type ConceptDictionary struct { ConceptsMap map[string]*Concept // contains filtered or unexported fields }
func NewConceptDictionary ¶
func NewConceptDictionary() *ConceptDictionary
type ConceptParser ¶
type ConceptParser struct {
// contains filtered or unexported fields
}
func (*ConceptParser) Parse ¶
func (parser *ConceptParser) Parse(text string) ([]*Step, *ParseDetailResult)
concept file can have multiple concept headings
func (*ConceptParser) ParseFile ¶ added in v0.1.8
func (parser *ConceptParser) ParseFile(file string) ([]*Step, *ParseDetailResult)
type DataTable ¶
func (*DataTable) IsInitialized ¶
type Heading ¶
type Heading struct { Value string LineNo int HeadingType HeadingType }
type HeadingType ¶
type HeadingType int
type ParamResolver ¶
type ParamResolver struct { }
func (*ParamResolver) GetResolvedParams ¶
func (paramResolver *ParamResolver) GetResolvedParams(step *Step, parent *Step, dataTableLookup *ArgLookup) []*gauge_messages.Parameter
type ParseDetailResult ¶
type ParseDetailResult struct { Error *ParseError Warnings []*Warning }
type ParseError ¶
func AddConcepts ¶
func AddConcepts(conceptFile string, conceptDictionary *ConceptDictionary) *ParseError
func (*ParseError) Error ¶
func (se *ParseError) Error() string
type ParseResult ¶
type ParseResult struct { ParseError *ParseError Warnings []*Warning Ok bool FileName string }
func (*ParseResult) Error ¶
func (result *ParseResult) Error() string
type Scenario ¶
func (*Scenario) Traverse ¶
func (scenario *Scenario) Traverse(traverser ScenarioTraverser)
type ScenarioTraverser ¶
type SpecItemFilter ¶
type SpecParser ¶
type SpecParser struct {
// contains filtered or unexported fields
}
func (*SpecParser) CreateSpecification ¶
func (specParser *SpecParser) CreateSpecification(tokens []*Token, conceptDictionary *ConceptDictionary) (*Specification, *ParseResult)
func (*SpecParser) GenerateTokens ¶
func (parser *SpecParser) GenerateTokens(specText string) ([]*Token, *ParseError)
func (*SpecParser) Parse ¶
func (parser *SpecParser) Parse(specText string, conceptDictionary *ConceptDictionary) (*Specification, *ParseResult)
type SpecTraverser ¶
type Specification ¶
type Specification struct { Heading *Heading Scenarios []*Scenario Comments []*Comment DataTable DataTable Contexts []*Step FileName string Tags *Tags Items []Item TearDownSteps []*Step }
func (*Specification) CreateStepUsingLookup ¶
func (spec *Specification) CreateStepUsingLookup(stepToken *Token, lookup *ArgLookup) (*Step, *ParseDetailResult)
func (*Specification) Filter ¶
func (spec *Specification) Filter(filter SpecItemFilter)
func (*Specification) GetSpecItems ¶
func (specification *Specification) GetSpecItems() []Item
func (*Specification) RenameSteps ¶
func (*Specification) Traverse ¶
func (spec *Specification) Traverse(traverser SpecTraverser)
type Step ¶
type Step struct { LineNo int Value string LineText string Args []*StepArg IsConcept bool Lookup ArgLookup ConceptSteps []*Step Fragments []*gauge_messages.Fragment Parent *Step HasInlineTable bool Items []Item PreComments []*Comment }
func CreateStepFromStepRequest ¶
func CreateStepFromStepRequest(stepReq *gauge_messages.ExecuteStepRequest) *Step
func (*Step) PopulateFragments ¶
func (step *Step) PopulateFragments()
func (*Step) ReplaceArgsWithDynamic ¶
type StepValue ¶
func CreateStepValue ¶
type Table ¶
func TableFrom ¶
func TableFrom(protoTable *gauge_messages.ProtoTable) *Table
func (*Table) AddHeaders ¶ added in v0.3.0
func (*Table) AddRowValues ¶ added in v0.3.0
func (*Table) GetDynamicArgs ¶
func (*Table) GetRowCount ¶
func (*Table) IsInitialized ¶
Click to show internal directories.
Click to hide internal directories.