mn8 Language Reference | Index    

Assert

SUMMARY: NO ATTRIBUTES  NO ELEMENTS  NO CONSTRUCTORS  NO OPERATORS  METHODS SUMMARYDETAIL: NO ATTRIBUTES  NO ELEMENTS  NO CONSTRUCTORS  NO OPERATORS  METHOD DETAILS

Description

This concept is used to create an atomic assertion to test something.

Usage

An assert concept always return with something that will be a result of a test. Better is you use an assert to return a test method like this example:

            : test_any [
                ...
                ...
                return .assert(...)] typeof String

You can use the following assertions:

Version: 0.1
Authors:Antal Attila ()
Location:
Inherits: Concept
Inherited by: TestCase

Method List

static StringassertEquals (Concept $e, Concept $a)
static StringassertEquals (String $msg, Concept $e, Concept $a)
static StringassertNil (Concept $c)
static StringassertNil (String $msg, Concept $c)
static StringassertNotNil (Concept $c)
static StringassertNotNil (String $msg, Concept $c)
static StringassertTrue (String $msg, Logical $cond)
static StringassertTrue (Logical $cond)
static Stringfail (String $msg)
static Stringfail
static StringfailNotEquals (String $msg, Concept $e, Concept $a)
top
Methods inherited from: Concept
cloneConcept, extendsConcept, fromXML, getAllInheritedConcepts, getConceptAttribute, getConceptAttributeField, getConceptAttributeFields, getConceptAttributes, getConceptConstructors, getConceptElement, getConceptElementField, getConceptElementFields, getConceptElements, getConceptLabel, getConceptMethod, getConceptMethods, getConceptOperators, getConceptType, getErrorHandler, getInheritedConcepts, getResourceURI, hasConceptAttribute, hasConceptElement, hasConceptMethod, hasPath, isHidden, loadContent, setConceptLabel, setErrorHandler, setHidden, setShowEmpty, showEmpty, toTXT, toXML, setResourceURI

Detailed Method Info

static assertEquals (Concept $e, Concept $a)
Parameters:
$e :a concept
$a :other concept
Returns: String

this method tests if a two concept is equals

top
static assertEquals (String $msg, Concept $e, Concept $a)
Parameters:
$msg :test method message
$e :a concept
$a :other concept
Returns: String

this method tests if two concept is equals and can specify a message

top
static assertNil (Concept $c)
Parameters:
$c :concept for testing
Returns: String

tests if concept is nil

top
static assertNil (String $msg, Concept $c)
Parameters:
$msg :message from test method
$c :concept for testing
Returns: String

tests if concept is nil with message

top
static assertNotNil (Concept $c)
Parameters:
$c :concept for testing
Returns: String

tests if concept is not nil

top
static assertNotNil (String $msg, Concept $c)
Parameters:
$msg :message from test method
$c :concept for testing
Returns: String

tests if concept is not nil with message

top
static assertTrue (String $msg, Logical $cond)
Parameters:
$msg :message from test method
$cond :logical condition to test
Returns: String

tests if the logical condition is true with message

top
static assertTrue (Logical $cond)
Parameters:
$cond :logical condition to test
Returns: String

tests if the logical condition is true

top
static fail (String $msg)
Parameters:
$msg :fail massage from test method
Returns: String

throws directly a failed assert with message

top
static fail
Returns: String

throws directly a failed assert

top
static failNotEquals (String $msg, Concept $e, Concept $a)
Parameters:
$msg :fail massage from test method
$e :one concept
$a :other concept
Returns: String

throws directly a failed assert to message the concepts in parameters is not equals

top