本文整理汇总了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));
示例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));
});
示例3: it
it("should match the event with the projection definition", () => {
matcher.verify(m => m.match("increment"), Times.exactly(5));
});
示例4:
return subject.transform(request, response).then(() => {
middleware.verify(r => r.transform(It.isValue(request), It.isValue(response), anyValue), Times.exactly(2));
});
示例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());
});
示例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 => {
示例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());
});