yamlparser

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Given

type Given struct {
	Host string `yaml:"host"`
	// contains filtered or unexported fields
}

type Scenario

type Scenario struct {
	Name        string `yaml:"Scenario"`
	Description string `yaml:"description"`
	Given       Given  `yaml:"Given"`
	Tests       []Test `yaml:"Tests"`
}

type Test

type Test struct {
	When When `yaml:"When"`
	Then Then `yaml:"Then"`
}

type Tests

type Tests struct {
	Feature   string     `yaml:"Feature"`
	Scenarios []Scenario `yaml:"Scenarios"`
}

type Then

type Then struct {
	Status  int      `yaml:"status"`
	Header  []string `yaml:"header"`
	Format  string   `yaml:"format"`
	Require []string `yaml:"require"`
	Retry   bool     `yaml:"retry"`
}

type When

type When struct {
	Host   string   `yaml:"host"`
	Path   string   `yaml:"path"`
	Method string   `yaml:"method"`
	Header []string `yaml:"header"`
	Body   string   `yaml:"body"`
}

type YamlParser

type YamlParser struct {
	Tests Tests
}

YamlParser .

func NewYamlParser

func NewYamlParser() *YamlParser

NewYamlParser empty.

func (*YamlParser) Parse

func (ym *YamlParser) Parse(path string) ([]apitest.Scenario, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL