Test.TestCase Class
+ + + + +Test case containing various tests to run.
+Item Index
+ + + + + + + + + + +Methods
+ + +assert
+
+
+ -
+
+
-
+
+
condition+ +
+
+ -
+
+
message+ +
+
+
Asserts that a given condition is true. If not, then a YUITest.AssertionError object is thrown +and the test fails.
+callback
+
+
+ ()
+
+
+
+
+ Function
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Method to call from an async init method to +restart the test case. When called, returns a function +that should be called when tests are ready to continue.
+Returns:
+ +destroy
+
+
+ ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Function to run once after tests finish running. +This executes after the last call to tearDown().
+fail
+
+
+ -
+
+
-
+
+
message+ +
+
+
Forces an assertion error to occur. Shortcut for YUITest.Assert.fail().
+Parameters:
+ +-
+
+
-
+
+
message+ String + + + + +++ + +(Optional) The message to display with the failure.
+
+
+
init
+
+
+ ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Function to run once before tests start to run. +This executes before the first call to setUp().
+resume
+
+
+ -
+
+
-
+
+
segment+ +
+
+
Resumes a paused test and runs the given function.
+Parameters:
+ +-
+
+
-
+
+
segment+ Function + + + + +++ + +(Optional) The function to run. + If omitted, the test automatically passes.
+
+
+
Returns:
+ +setUp
+
+
+ ()
+
+
+
+
+ Void
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Function to run before each test is executed.
+Returns:
+ +tearDown
+
+
+ ()
+
+
+
+
+ Void
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Function to run after each test is executed.
+Returns:
+ +wait
+
+
+ -
+
+
-
+
+
segment+ +
+
+ -
+
+
delay+ +
+
+
Causes the test case to wait a specified amount of time and then +continue executing the given code.
+Parameters:
+ +-
+
+
-
+
+
segment+ Function + + + + +++ + +(Optional) The function to run after the delay. + If omitted, the TestRunner will wait until resume() is called.
+
+
+ -
+
+
delay+ Int + + + + +++ + +(Optional) The number of milliseconds to wait before running + the function. If omitted, defaults to zero.
+
+
+
