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


TypeScript Times.never方法代码示例

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


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

示例1: test

    test('Expression not evaluated in non-.tidal file', async () => {
        let mockTidal = TypeMoq.Mock.ofType<ITidal>();
        let mockConfig = TypeMoq.Mock.ofType<Config>();
        let mockDocument = createMockDocument(['Foo', 'bar', '', 'baz']);
        let mockEditor = createMockEditor(mockDocument.object, new Selection(new Position(1, 0), new Position(1, 2)));
        let mockHistory = TypeMoq.Mock.ofType<IHistory>();
        let mockCreateTextEditorDecorationType = createMockCreateTextEditorDecorationType();

        mockDocument.setup(d => d.fileName).returns(() => 'myfile.ideal');

        let repl = new Repl(mockTidal.object, mockEditor.object, mockHistory.object, 
            mockConfig.object, mockCreateTextEditorDecorationType.object);
        await repl.evaluate(false);

        mockTidal.verify(t => t.sendTidalExpression(TypeMoq.It.isAnyString()), TypeMoq.Times.never());
        mockHistory.verify(h => h.log(TypeMoq.It.isAny()), TypeMoq.Times.never());
    });
开发者ID:kindohm,项目名称:vscode-tidalcycles,代码行数:17,代码来源:repl.test.ts

示例2: test

	test('Open auto OAuth when the flyout is already open, return an error', () => {

		// If: Open auto OAuth dialog first time
		autoOAuthDialogController.openAutoOAuthDialog(providerId, title, message, userCode, uri);

		// Then: It should open the flyout successfully
		mockAutoOAuthDialog.verify(x => x.open(title, message, userCode, uri), TypeMoq.Times.once());
		mockErrorMessageService.verify(x => x.showDialog(TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny()), TypeMoq.Times.never());

		// If: a oauth flyout is already open
		autoOAuthDialogController.openAutoOAuthDialog(providerId, title, message, userCode, uri);

		// Then: An error dialog should have been opened
		mockErrorMessageService.verify(x => x.showDialog(TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny()), TypeMoq.Times.once());
	});
开发者ID:AlexxNica,项目名称:sqlopsstudio,代码行数:15,代码来源:autoOAuthDialogController.test.ts

示例3: it

 it("should drop the connection with a not found", () => {
     request.url = "/notfound";
     subject.route(request, response.object);
     requestHandler.verify(r => r.handle(It.isValue(request), It.isValue(response.object)), Times.never());
 });
开发者ID:tierratelematics,项目名称:prettygoat,代码行数:5,代码来源:RequestAdapterSpec.ts

示例4:

		deferredPromise.promise.then(() => {
			mockAccountManagementService.verify(x => x.getSecurityToken(TypeMoq.It.isAny()), TypeMoq.Times.once());
			mockErrorMessageService.verify(x => x.showDialog(TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny()), TypeMoq.Times.once());
			mockResourceProvider.verify(x => x.createFirewallRule(TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny()), TypeMoq.Times.never());
			done();
		});
开发者ID:burhandodhy,项目名称:azuredatastudio,代码行数:6,代码来源:firewallRuleDialogController.test.ts

示例5: 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

示例6: it

 it("should remove it", () => {
     subject.handle(request, response.object);
     response.verify(s => s.status(404), Times.never());
     snapshotRepository.verify(s => s.deleteSnapshot("projection"), Times.once());
 });
开发者ID:tierratelematics,项目名称:prettygoat,代码行数:5,代码来源:SnapshotHandlerSpec.ts


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