2017-05-20 23:15:34 +00:00
|
|
|
|
|
|
|
import sinon = require("sinon");
|
|
|
|
|
|
|
|
export interface LdapjsMock {
|
|
|
|
createClient: sinon.SinonStub;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface LdapjsClientMock {
|
|
|
|
bind: sinon.SinonStub;
|
2017-06-14 22:22:16 +00:00
|
|
|
unbind: sinon.SinonStub;
|
2017-05-20 23:15:34 +00:00
|
|
|
search: sinon.SinonStub;
|
|
|
|
modify: sinon.SinonStub;
|
|
|
|
on: sinon.SinonStub;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function LdapjsMock(): LdapjsMock {
|
|
|
|
return {
|
|
|
|
createClient: sinon.stub()
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export function LdapjsClientMock(): LdapjsClientMock {
|
|
|
|
return {
|
|
|
|
bind: sinon.stub(),
|
2017-06-14 22:22:16 +00:00
|
|
|
unbind: sinon.stub(),
|
2017-05-20 23:15:34 +00:00
|
|
|
search: sinon.stub(),
|
|
|
|
modify: sinon.stub(),
|
|
|
|
on: sinon.stub()
|
|
|
|
};
|
|
|
|
}
|