本文整理汇总了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();
});