Quintiq file version 2.0
|
#parent: #root
|
Method CreateDemoDataset
|
{
|
Description: 'Create default demo dataset or create dataset and import from path defined in GetTestDataPath, reusable for other test cases'
|
TextBody:
|
[*
|
opt := DatasetFindOptions::Construct( GlobalParameters_MP::GetDatasetScenarioManager() );
|
scenariomanager := MDSScenarioManager::Find( opt );
|
|
opt := DatasetFindOptions::Construct();
|
mpsync := MDSMPSync::Find( opt );
|
|
opt := DatasetFindOptions::Construct()
|
mpdomainhandler := MDSMPDomainHandler::Find( opt );
|
|
opt := DatasetFindOptions::Construct();
|
swfworkflow := MDSSWF_WorkflowDataset::Find( opt );
|
|
if ( this.GetDemoScenario() <> "" )
|
{
|
scenariomanager->( scenariodataset)
|
{
|
demo := select( scenariodataset, ScenarioMP, scenario, scenario.Name() = this.GetDemoScenario() and scenario.Parent().Name() = this.GetDemoFolder() )
|
if ( isnull( demo ) )
|
{
|
scenariomanager.CreateDemoScenariosAndImport( this.GetDemoFolder(), this.GetDemoScenario() , mpsync, mpdomainhandler, swfworkflow, "UTF" );
|
}
|
|
}
|
}
|
|
// Create scenario and import data if there is a test data path specified
|
else if( this.GetTestDataPath() <> "" )
|
{
|
scenariomanager->( scenariodataset )
|
{
|
scenario := select( scenariodataset, ScenarioMP, scenario, scenario.Name() = this.GetUTFDatasetname() );
|
if( isnull( scenario ) )
|
{
|
this.CreateScenarioAndImportDataFromPath( mpsync, scenariomanager );
|
}
|
}
|
}
|
*]
|
InterfaceProperties { Accessibility: 'Module' }
|
}
|