1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.MockServerHelper = void 0;
|
4 | let id = 0;
|
5 | /* eslint-disable class-methods-use-this */
|
6 | class MockServerHelper {
|
7 | /**
|
8 | * Returns random integer between min and max.
|
9 | * @param min Minimum value that is used for calculation
|
10 | * @param max Maximum value that is used for calculation
|
11 | */
|
12 | getRandomInt(min = 0, max = 2147483648) {
|
13 | return Math.floor(Math.random() * (max - min + 1)) + min;
|
14 | }
|
15 | /** Returns unique integer */
|
16 | getUniqueIdInt() {
|
17 | return ++id;
|
18 | }
|
19 | }
|
20 | exports.MockServerHelper = MockServerHelper;
|
21 | const mockServerHelper = new MockServerHelper();
|
22 | exports.default = mockServerHelper;
|