klyn.unittest.Assert.assertRaises
method
public static assertRaises(expected as Type, block as Object) as Void:
Description
Verifies that executing the lambda raises the expected exception type.
import klyn.unittest

Assert.assertRaises(TypeError, lambda (): Char(-1))
Parameters
  • expected The expected exception type.
  • block The lambda to execute. ``` import klyn.unittest Assert.assertRaises(TypeError, lambda (): Char(-1)) ```