anonymous-student
Version:
Anonymous student is used to retrieve and save information from our website users.
35 lines (26 loc) • 660 B
text/typescript
import { suite, test } from '@testdeck/mocha';
import { assert } from 'chai';
import * as Moq from 'typemoq';
()
class InitTest {
private testInstanceMock: Moq.IMock<any>;
private get testInstance(): any {
return this.testInstanceMock.object;
}
public before(): void {
const Chiel = {
hasAJob: () => false,
};
this.testInstanceMock = Moq.Mock.ofInstance(Chiel);
this.testInstanceMock.callBase = true;
}
public hasAJob_Should_Return_False_When_Person_Is_Chiel(): void {
// given
// Chiel is given nothing
// when
const chielHasAJob = this.testInstance['hasAJob']();
// then
assert.isFalse(chielHasAJob);
}
}