Guest User

Untitled

a guest
Mar 24th, 2019
56
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const assert = require('assert');
  2.  
  3. // ... Ton code ici ...
  4.  
  5. class BankCustomer{
  6. constructor(nameClient, codeSecret){
  7. let verifCode = codeSecret;
  8. let clientNom = nameClient;
  9.  
  10. this.getName = () => {
  11. return clientNom;
  12. }
  13. this.verifyPinInput = (codeSecretEntrer) => {
  14. if (codeSecretEntrer === verifCode){
  15. return true;
  16. } else {
  17. return false;
  18. }
  19. }
  20. }
  21. }
  22.  
  23. // Tests
  24. const customer = new BankCustomer('John Doe', '3579');
  25. assert.equal(typeof customer.getName, 'function');
  26. assert.equal(typeof customer.verifyPinInput, 'function');
  27. assert.equal(customer.getName(), 'John Doe');
  28. assert.ok(customer.verifyPinInput('3579'));
RAW Paste Data