当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript Times.exactly方法代码示例

本文整理汇总了TypeScript中typemoq.Times.exactly方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Times.exactly方法的具体用法?TypeScript Times.exactly怎么用?TypeScript Times.exactly使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在typemoq.Times的用法示例。


在下文中一共展示了Times.exactly方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: done

		connectionAction.run().then((value) => {
			connectionManagementService.verify(x => x.isConnected(undefined, TypeMoq.It.isAny()), TypeMoq.Times.atLeastOnce());
			objectExplorerService.verify(x => x.getObjectExplorerNode(TypeMoq.It.isAny()), TypeMoq.Times.exactly(0));
			objectExplorerService.verify(x => x.refreshTreeNode(TypeMoq.It.isAny(), TypeMoq.It.isAny()), TypeMoq.Times.exactly(0));
			tree.verify(x => x.refresh(TypeMoq.It.isAny()), TypeMoq.Times.exactly(0));
			tree.verify(x => x.expand(TypeMoq.It.isAny()), TypeMoq.Times.exactly(0));
		}).then(() => done(), (err) => done(err));
开发者ID:burhandodhy,项目名称:azuredatastudio,代码行数:7,代码来源:connectionTreeActions.test.ts

示例2: it

 it('logs debug and verbose messages', () => {
   const consoleProxy = TypeMoq.Mock.ofType<ConsoleProxy>();
   const consoleSink = new ConsoleSink({ console: consoleProxy.object });
   consoleSink.emit([
     new LogEvent('', LogEventLevel.debug, new MessageTemplate('Test')),
     new LogEvent('', LogEventLevel.verbose, new MessageTemplate('Test'))
   ]);
   consoleProxy.verify(m => m.debug(TypeMoq.It.isAny()), TypeMoq.Times.exactly(2));
 });
开发者ID:structured-log,项目名称:structured-log,代码行数:9,代码来源:consoleSink.spec.ts

示例3: it

 it("should match the event with the projection definition", () => {
     matcher.verify(m => m.match("increment"), Times.exactly(5));
 });
开发者ID:tierratelematics,项目名称:prettygoat,代码行数:3,代码来源:ProjectionRunnerSpec.ts

示例4:

 return subject.transform(request, response).then(() => {
     middleware.verify(r => r.transform(It.isValue(request), It.isValue(response), anyValue), Times.exactly(2));
 });
开发者ID:tierratelematics,项目名称:prettygoat,代码行数:3,代码来源:MiddlewareTransformerSpec.ts

示例5: test

	test('Open and close auto OAuth dialog multiple times should work properly', () => {
		let title = 'Add Account';
		let message = 'This is the dialog description';
		let userCode = 'abcde';
		let uri = 'uri';

		autoOAuthDialogController.openAutoOAuthDialog(providerId, title, message, userCode, uri);
		autoOAuthDialogController.closeAutoOAuthDialog();

		// If: Open the flyout second time
		autoOAuthDialogController.openAutoOAuthDialog(providerId, title, message, userCode, uri);

		// Then: It should open the flyout twice successfully
		mockAutoOAuthDialog.verify(x => x.open(TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny()), TypeMoq.Times.exactly(2));
		mockErrorMessageService.verify(x => x.showDialog(TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny()), TypeMoq.Times.never());
	});
开发者ID:AlexxNica,项目名称:sqlopsstudio,代码行数:16,代码来源:autoOAuthDialogController.test.ts

示例6:

		promise.then(() => {
			credentialStore.verify(x => x.saveCredential(TypeMoq.It.isAny(), TypeMoq.It.isAny()), TypeMoq.Times.exactly(numCreds));
			let recentConnections = connectionStore.getActiveConnections();
			assert.equal(numCreds, recentConnections.length, `expect number of active connection ${numCreds}|${recentConnections.length} `);
			done();
		}, err => {
开发者ID:jumpinjackie,项目名称:sqlopsstudio,代码行数:6,代码来源:connectionStore.test.ts

示例7: it

 it("should trigger an error", () => {
     subject.handle(request, response.object);
     response.verify(s => s.status(404), Times.exactly(1));
     response.verify(s => s.send(It.isAny()), Times.exactly(1));
     projectionRunner.verify(s => s.stop(), Times.never());
 });
开发者ID:tierratelematics,项目名称:prettygoat,代码行数:6,代码来源:ProjectionsHandlerSpec.ts


注:本文中的typemoq.Times.exactly方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。