const classxfant::TestCase

sys::Obj
  xfant::TestCase : xfant::Xtest

Creates a test for a method.

The method must:

  • have a name that starts with "test",
  • not be abstract.
call

Obj? call(Test test)

Calls method on the test instance and returns result

checkMethodIsNotAbstract

protected Void checkMethodIsNotAbstract(Method method)

checkMethodName

protected Void checkMethodName(Method method)

classname

virtual override Str classname()

The classname of wich this test belongs.

fromStr

static new fromStr(Str pattern, Bool checked := true)

Matches pattern with pod::type.slot. If matches, returns the Slot, if the string is invalid returns an error if checked is true or null otherwise.

isIgnored

Bool isIgnored()

make

new make(Method method)

Constructor

makeTest

Test makeTest()

Create the Test instance specified by type

method

const Method method

Method to test

name

virtual override Str name()

The name of the test

re

const static Regex re := "(\w+)[:]{2}(\w+)[.]{1}(\w+)".toRegex

Regex to parse a pod::type.slot pattern.

toStr

virtual override Str toStr()

Name of the test.

type

Type type()

Type of the class where the method belongs