Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. var assert = require('assert');
  2. // ... Ton code ici ...
  3. var BankCustomer = /** @class */ (function () {
  4. function BankCustomer(name, code) {
  5. this.name = name;
  6. this.code = code;
  7. }
  8. BankCustomer.prototype.getName = function () {
  9. return this.name;
  10. };
  11. BankCustomer.prototype.verifyPinInput = function (code) {
  12. if (this.code === '3579') {
  13. return true;
  14. }
  15. else {
  16. return false;
  17. }
  18. };
  19. return BankCustomer;
  20. }());
  21. // Tests
  22. var customer = new BankCustomer('John Doe', '3579');
  23. assert.equal(typeof customer.getName, 'function');
  24. assert.equal(typeof customer.verifyPinInput, 'function');
  25. assert.equal(customer.getName(), 'John Doe');
  26. assert.ok(customer.verifyPinInput('3579'));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement