23 lines
491 B
JavaScript
23 lines
491 B
JavaScript
|
/**
|
||
|
* Returns the requesetd type of set
|
||
|
*/
|
||
|
rectest.set.SetFactory = Class( 'SetFactory',
|
||
|
{
|
||
|
'public fromId': function( id, test_case, options )
|
||
|
{
|
||
|
var sets = rectest.set;
|
||
|
|
||
|
if ( !( Class.isA( rectest.TestCase, test_case ) ) )
|
||
|
{
|
||
|
throw TypeError( "Invalid test case: " + test_case );
|
||
|
}
|
||
|
|
||
|
return [
|
||
|
null,
|
||
|
sets.RandomGroupedSet,
|
||
|
null,
|
||
|
null
|
||
|
][ id ]( test_case, options );
|
||
|
}
|
||
|
} );
|