"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", { value: true });
const ts_mockito_1 = require("ts-mockito");
const models_1 = require("../../models");
const services_1 = require("../../services");
const wallet_1 = require("./wallet");
let mockConnectionService = ts_mockito_1.mock(services_1.ConnectionService);
let stateService;
beforeEach(() => {
    ts_mockito_1.reset(mockConnectionService);
    stateService = new services_1.StateService();
});
describe('wallet', () => {
    describe('getAllWallets', () => {
        it('calls the connection service', () => __awaiter(void 0, void 0, void 0, function* () {
            ts_mockito_1.when(mockConnectionService.send(ts_mockito_1.anything(), ts_mockito_1.anything())).thenResolve('result');
            const result = yield wallet_1.getAllWallets(ts_mockito_1.instance(mockConnectionService));
            ts_mockito_1.verify(mockConnectionService.send(ts_mockito_1.deepEqual({}), ts_mockito_1.deepEqual(models_1.apiConfig.walletsGetAll))).once();
            expect(result).toStrictEqual('result');
        }));
    });
    describe('getWallet', () => {
        it('calls the connection service', () => __awaiter(void 0, void 0, void 0, function* () {
            ts_mockito_1.when(mockConnectionService.send(ts_mockito_1.anything(), ts_mockito_1.anything())).thenResolve('result');
            const result = yield wallet_1.getWallet(ts_mockito_1.instance(mockConnectionService), { walletId: 1 });
            ts_mockito_1.verify(mockConnectionService.send(ts_mockito_1.deepEqual({ walletId: 1 }), ts_mockito_1.deepEqual(models_1.apiConfig.walletsGet))).once();
            expect(result).toStrictEqual('result');
        }));
    });
});
