本文整理汇总了TypeScript中sql/parts/disasterRecovery/restore/restoreViewModel.RestoreViewModel.updateOptionWithConfigInfo方法的典型用法代码示例。如果您正苦于以下问题:TypeScript RestoreViewModel.updateOptionWithConfigInfo方法的具体用法?TypeScript RestoreViewModel.updateOptionWithConfigInfo怎么用?TypeScript RestoreViewModel.updateOptionWithConfigInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sql/parts/disasterRecovery/restore/restoreViewModel.RestoreViewModel
的用法示例。
在下文中一共展示了RestoreViewModel.updateOptionWithConfigInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: test
test('update options with config info should update option correctly', () => {
let databaseList = ['db1', 'db2'];
let configInfo: { [key: string]: any } = {};
configInfo['sourceDatabaseNamesWithBackupSets'] = databaseList;
configInfo[option1String] = 'option1 from config info';
viewModel.updateOptionWithConfigInfo(configInfo);
assert.equal(3, viewModel.databaseList.length);
assert.equal('', viewModel.databaseList[0]);
assert.equal(databaseList[1], viewModel.databaseList[1]);
assert.equal(databaseList[2], viewModel.databaseList[2]);
assert.equal('option1 from config info', viewModel.getOptionValue(option1String));
// verify that the options from get restore advanced options doesn't contain option1String
options = {};
viewModel.getRestoreAdvancedOptions(options);
assert.equal(undefined, options[option1String]);
});