scenjsonparse

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsStar

func IsStar(obj oj.OJsonObject) bool

IsStar returns whether check object is othe form "*".

Types

type Parser

type Parser struct {
	ExprInterpreter                  ei.ExprInterpreter
	AllowEsdtTxLegacySyntax          bool
	AllowEsdtLegacySetSyntax         bool
	AllowEsdtLegacyCheckSyntax       bool
	AllowSingleValueInCheckValueList bool
}

Parser performs parsing of both json tests (older) and scenarios (new).

func NewParser

func NewParser(fileResolver fr.FileResolver) Parser

NewParser provides a new Parser instance.

func (*Parser) ParseScenarioFile

func (p *Parser) ParseScenarioFile(jsonString []byte) (*mj.Scenario, error)

ParseScenarioFile converts a scenario json string to scenario object representation

func (*Parser) ParseScenarioStep

func (p *Parser) ParseScenarioStep(jsonSnippet string) (mj.Step, error)

ParseScenarioStep parses a single scenario step, instead of an entire file. Handy for tests, where step snippets can be embedded in code.

func (*Parser) ParseTestFile

func (p *Parser) ParseTestFile(jsonString []byte) ([]*mj.Test, error)

ParseTestFile converts json string to object representation

Jump to

Keyboard shortcuts

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