本文整理匯總了TypeScript中sql/parts/query/execution/queryModelService.QueryModelService.setup方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript QueryModelService.setup方法的具體用法?TypeScript QueryModelService.setup怎麽用?TypeScript QueryModelService.setup使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sql/parts/query/execution/queryModelService.QueryModelService
的用法示例。
在下文中一共展示了QueryModelService.setup方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: test
test('Taskbar buttons are set correctly upon connect', (done) => {
let params: INewConnectionParams = { connectionType: ConnectionType.editor, runQueryOnCompletion: RunQueryOnConnectionMode.none };
queryInput.onConnectSuccess(params);
queryModelService.setup(x => x.isRunningQuery(TypeMoq.It.isAny())).returns(() => false);
assert.equal(queryInput.runQueryEnabled, true, 'runQueryAction button should be enabled');
assert.equal(queryInput.cancelQueryEnabled, false, 'cancelQueryAction button should not be enabled');
assert.equal(queryInput.connectEnabled, false, 'connectDatabaseAction button should not be enabled');
assert.equal(queryInput.disconnectEnabled, true, 'disconnectDatabaseAction button should be enabled');
assert.equal(queryInput.changeConnectionEnabled, true, 'changeConnectionAction button should be enabled');
assert.equal(queryInput.listDatabasesConnected, true);
done();
});