Yahoo! UI Library

test  3.3.0pr1

Yahoo! UI Library > test > Test.Case
Search:
 
Filters

Class Test.Case

Test case containing various tests to run.

Constructor

Test.Case ( template )
Parameters:
template <object> An object containing any number of test methods, other methods, an optional name, and anything else the test case needs.

Properties

_should - object

Special rules for the test case. Possible subobjects are fail, for tests that should fail, and error, for tests that should throw an error.

name - object

Name for the test case.

Methods

resume

Void 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.

setUp

Void setUp ( )
Function to run before each test is executed.

tearDown

Void tearDown ( )
Function to run after each test is executed.

wait

Void 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.


Copyright © 2010 Yahoo! Inc. All rights reserved.