2017-05-21 06:15:34 +07:00
|
|
|
|
|
|
|
import sinon = require("sinon");
|
|
|
|
|
|
|
|
export interface LdapjsMock {
|
|
|
|
createClient: sinon.SinonStub;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface LdapjsClientMock {
|
|
|
|
bind: sinon.SinonStub;
|
2017-06-15 05:22:16 +07:00
|
|
|
unbind: sinon.SinonStub;
|
2017-05-21 06:15:34 +07: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-15 05:22:16 +07:00
|
|
|
unbind: sinon.stub(),
|
2017-05-21 06:15:34 +07:00
|
|
|
search: sinon.stub(),
|
|
|
|
modify: sinon.stub(),
|
|
|
|
on: sinon.stub()
|
|
|
|
};
|
|
|
|
}
|