driver

package
v0.6.0-beta Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataGroup

type DataGroup struct {
	Groups []Group `json:"groups"`
}

DataGroup represents the overall structure of the JSON.

func LoadTestGroups

func LoadTestGroups(filePath string) (DataGroup, error)

type Group

type Group struct {
	Name  string `json:"name"`
	Steps []Step `json:"steps"`
}

Group represents a group of steps

func FilterGroupsByName

func FilterGroupsByName(groups []Group, name string) []Group

type Session

type Session struct {
	Name   string  `json:"name"`
	Groups []Group `json:"groups"`
}

func ReadData

func ReadData() []Session

type Step

type Step struct {
	Input           string `json:"input"`
	ExpectedContent string `json:"expectedContent"`
}

func (*Step) MatchesExpectedContent

func (s *Step) MatchesExpectedContent(content []byte) (bool, error)

type TestCase

type TestCase struct {
	Name            string
	Input           string
	ExpectedContent string
}

func CreateTestCases

func CreateTestCases(group DataGroup) []TestCase

func (*TestCase) MatchesExpectedContent

func (s *TestCase) MatchesExpectedContent(content []byte) (bool, error)

Jump to

Keyboard shortcuts

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