зеркало из
1
0
Форкнуть 0
This commit is contained in:
Damon Barry 2015-12-02 09:00:18 -08:00
Родитель 8eebaf4db9
Коммит 4058e4d766
3 изменённых файлов: 15 добавлений и 2 удалений

Просмотреть файл

@ -51,6 +51,10 @@ EventHubClient.prototype.open = function () {
return this._connectPromise;
};
EventHubClient.prototype.close = function () {
return Promise.resolve();
};
EventHubClient.prototype.getPartitionIds = function () {
return new Promise(function (resolve, reject) {
var endpoint = '$management';

Просмотреть файл

@ -12,12 +12,19 @@ chai.use(chaiAsPromised);
var EventHubClient = require('../lib/client.js');
describe('EventHubClient', function () {
describe('#open', function () {
this.timeout(15000);
this.timeout(15000);
describe('#open', function () {
it('opens a connection to the Event Hub', function () {
var client = EventHubClient.fromConnectionString(process.env.EVENT_HUB_CONNECTION_STRING, process.env.EVENT_HUB_PATH);
return client.open().should.be.fulfilled;
});
});
describe('#close', function () {
it('is a no-op when the connection is already closed', function () {
var client = EventHubClient.fromConnectionString(process.env.EVENT_HUB_CONNECTION_STRING, process.env.EVENT_HUB_PATH);
return client.close().should.be.fulfilled;
});
});
});

Просмотреть файл

@ -12,6 +12,8 @@ var MessagingEntityNotFoundError = require('../lib/errors.js').MessagingEntityNo
var ArgumentOutOfRangeError = require('../lib/errors.js').ArgumentOutOfRangeError;
describe('EventHubClient', function () {
this.timeout(15000);
describe('#createReceiver', function () {
it('returns a Receiver', function () {
var client = EventHubClient.fromConnectionString(process.env.EVENT_HUB_CONNECTION_STRING, process.env.EVENT_HUB_PATH);