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
Calls
method
on thetest
instance and returns result- checkMethodIsNotAbstract
- checkMethodName
- classname
virtual override Str classname()
The classname of wich this test belongs.
- fromStr
static new fromStr(Str pattern, Bool checked := true)
Matches
pattern
withpod::type.slot
. If matches, returns theSlot
, if the string is invalid returns an error ifchecked
istrue
ornull
otherwise.- isIgnored
Bool isIgnored()
- make
new make(Method method)
Constructor
- makeTest
Test makeTest()
Create the
Test
instance specified bytype
- 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