Source Code

A framework for software testing

By: Tom Bentley, Tomáš Hradec
Packages
ceylon.test
Attributes
errorSource Code
shared error error

A test is in error if it propgates any exception which is not an AssertException

failureSource Code
shared failure failure

A test fails if it propgates an AssertException

runningSource Code
shared running running

A test is running if it has been started, but has not yet completed execution.

successSource Code
shared success success

A test fails if it complete normally, (that is, does not throw an exception).

undefinedSource Code
shared undefined undefined

A test which has not yet started execution.

Methods
assertEqualsSource Code
shared void assertEquals(Object? expected, Object? actual, String? message, Boolean compare(Object? expected, Object? actual))

Fails the test if the given objects are not equal according to the given compare function.

assertFalseSource Code
shared void assertFalse(Boolean condition, String message)

Fails the test if the assertion is true

assertNotEqualsSource Code
shared void assertNotEquals(Object? expected, Object? actual, String? message, Boolean compare(Object? expected, Object? actual))

Fails the test if the given objects are equal according to the given compare function.

assertNotNullSource Code
shared void assertNotNull(Object? got, String message)

Fails the test if the given result is null

assertNullSource Code
shared void assertNull(Object? got, String message)

Fails the test if the given result is not null

assertTrueSource Code
shared void assertTrue(Boolean condition, String message)

Fails the test if the assertion is false

failSource Code
shared void fail(String message)

Fails the test.

suiteSource Code
shared void suite(String suiteName, <String->Anything()>[] tests)

Configure a TestRunner with the given tests and run it

Interfaces
TestListenerSource Code

Contract for things needing to be informed about the execution of tests by a TestRunner.

Classes
PrintingTestListenerSource Code

A TestListener which prints information about test execution to the standard output.

TestResultSource Code
shared TestResult

Holds the results of running the tests held by the given runner.

TestRunnerSource Code
shared TestRunner

Capable of running tests, notifying TestListeners about each test

TestStateSource Code
shared abstract TestState

Enumerates the possible states of a TestUnit

TestUnitSource Code
shared TestUnit

A named piece of test code, and it's state.

errorSource Code
shared error

A test is in error if it propgates any exception which is not an AssertException

failureSource Code
shared failure

A test fails if it propgates an AssertException

runningSource Code
shared running

A test is running if it has been started, but has not yet completed execution.

successSource Code
shared success

A test fails if it complete normally, (that is, does not throw an exception).

undefinedSource Code
shared undefined

A test which has not yet started execution.

Exceptions
AssertComparisonExceptionSource Code

Subclass of AssertException for assertion failures dues to two things not being equal

AssertExceptionSource Code

Thrown when assertion failures