pgadmin4/web/regression/javascript/fake_model.js
Joao De Almeida Pereira 7dd6372eeb Extract the tests and refactor some of the methods.
Extract some of the ACI Tree functionalities, and decouple it from the
main source. Also - create some abstractions from the repeated code
around the enable/disable the schema children object create/edit/delete
functionalities, and also created the dialog wrappers for backup and
restore dialogs.

Reviewed by: Khushboo and Ashesh
Refactored by: Ashesh
2018-06-05 16:42:59 +05:30

22 lines
283 B
JavaScript

export class FakeModel {
constructor() {
this.values = {};
}
set(key, value) {
this.values[key] = value;
}
get(key) {
return this.values[key];
}
unset(key) {
delete this.values[key];
}
toJSON() {
return Object.assign({}, this.values);
}
}