"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var chai_1 = require("chai");
var TopUpProviderSupportService_1 = require("../../../src/core/services/TopUpProviderSupportService");
var countries_1 = require("../../../src/core/utils/countries");
var TopUpProvider_1 = require("../../../src/core/models/TopUpProvider");
describe('TopUpProviderSupportService', function () {
    var service;
    beforeEach(function () {
        service = new TopUpProviderSupportService_1.TopUpProviderSupportService(countries_1.countries);
    });
    describe('checkRampSupport', function () {
        it('returns true for supported country', function () {
            chai_1.expect(service.checkRampSupport('Poland')).to.be.true;
        });
        it('returns false for unsupported country', function () {
            chai_1.expect(service.checkRampSupport('United States')).to.be.false;
        });
    });
    describe('checkSafelloSupport', function () {
        it('returns true for supported country', function () {
            chai_1.expect(service.checkSafelloSupport('Denmark')).to.be.true;
        });
        it('returns false for unsupported country', function () {
            chai_1.expect(service.checkSafelloSupport('Poland')).to.be.false;
        });
    });
    describe('checkWyreSupport', function () {
        it('returns true for supported country', function () {
            chai_1.expect(service.checkWyreSupport('United States')).to.be.true;
        });
        it('returns false for unsupported country', function () {
            chai_1.expect(service.checkWyreSupport('Poland')).to.be.false;
        });
    });
    describe('getSupportingProviders', function () {
        it('returns a list of providers supporting given country', function () {
            chai_1.expect(service.getProviders('Denmark'))
                .to.have.members([TopUpProvider_1.TopUpProvider.RAMP, TopUpProvider_1.TopUpProvider.SAFELLO]);
        });
        it('returns an empty list for unsupported country', function () {
            chai_1.expect(service.getProviders('Albania')).to.be.an('array').that.is.empty;
        });
    });
    describe('isInputAmountUsed', function () {
        it('Safello', function () {
            chai_1.expect(service.isInputAmountUsed(TopUpProvider_1.TopUpProvider.SAFELLO)).to.be.false;
        });
        it('Ramp', function () {
            chai_1.expect(service.isInputAmountUsed(TopUpProvider_1.TopUpProvider.RAMP)).to.be.true;
        });
        it('undefined', function () {
            chai_1.expect(service.isInputAmountUsed()).to.be.false;
        });
    });
});
//# sourceMappingURL=TopUpProviderSupportService.test.js.map