assert

package
v0.9.50 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Suite of testing-oriented commands that will trigger errors or failures if they aren't satistifed.

The Assert module is aimed at making it easier to write scripts that perform test validation, as is frequently done during automated acceptance testing of web applications.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commands

type Commands struct {
	friendscript.Module
	// contains filtered or unexported fields
}

func New

func New(browser *browser.Browser, scopeable utils.Scopeable) *Commands

func (*Commands) Empty added in v0.9.43

func (self *Commands) Empty(value interface{}) error

Return an error if the given value not empty.

func (*Commands) Exists added in v0.9.43

func (self *Commands) Exists(value interface{}) error

Return an error if the given value is null or zero-length.

func (*Commands) False added in v0.9.43

func (self *Commands) False(value interface{}) error

Return an error if the given value is not false.

func (*Commands) IsArray added in v0.9.43

func (self *Commands) IsArray(value interface{}) error

Return an error if the given value is not an array.

func (*Commands) IsBoolean added in v0.9.43

func (self *Commands) IsBoolean(value interface{}) error

Return an error if the given value is not a boolean value.

func (*Commands) IsDuration added in v0.9.43

func (self *Commands) IsDuration(value interface{}) error

Return an error if the given value is not parsable as a duration.

func (*Commands) IsNumeric added in v0.9.43

func (self *Commands) IsNumeric(value interface{}) error

Return an error if the given value is not a numeric value.

func (*Commands) IsObject added in v0.9.43

func (self *Commands) IsObject(value interface{}) error

Return an error if the given value is not an object.

func (*Commands) IsScalar added in v0.9.43

func (self *Commands) IsScalar(value interface{}) error

Return an error if the given value is not a scalar value.

func (*Commands) IsString added in v0.9.43

func (self *Commands) IsString(value interface{}) error

Return an error if the given value is not a string.

func (*Commands) IsTime added in v0.9.43

func (self *Commands) IsTime(value interface{}) error

Return an error if the given value is not parsable as a time.

func (*Commands) NotNull added in v0.9.43

func (self *Commands) NotNull(value interface{}) error

Return an error if the given value is null.

func (*Commands) Null added in v0.9.43

func (self *Commands) Null(value interface{}) error

Return an error if the given value is not null.

func (*Commands) True added in v0.9.43

func (self *Commands) True(value interface{}) error

Return an error if the given value is not true.

Jump to

Keyboard shortcuts

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