"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const chai_1 = require("chai");
const sinon = require("sinon");
const profile_1 = require("../src/server/profile");
const shortcode_1 = require("../src/server/shortcode");
chai_1.use(require('sinon-chai'));
chai_1.use(require('chai-subset'));
chai_1.use(require('chai-as-promised'));
/**
 * Mock implementation of IRequester
 */
class MockRequester {
    constructor() {
        this.json = sinon.stub();
        this.run = sinon.stub();
        this.with = sinon.stub().returns(this);
    }
}
exports.MockRequester = MockRequester;
function createExpiredOAuthTokens() {
    return new shortcode_1.OAuthTokens({
        accessToken: 'expired_access_token',
        refreshToken: 'expired_refresh_token',
        scopes: profile_1.Profile.necessaryScopes,
        expiresAt: new Date(Date.now() - 1),
    });
}
exports.createExpiredOAuthTokens = createExpiredOAuthTokens;
function createValidOAuthTokens() {
    return new shortcode_1.OAuthTokens({
        accessToken: 'access_token',
        refreshToken: 'refresh_token',
        scopes: profile_1.Profile.necessaryScopes,
        expiresAt: new Date(Date.now() + 10000),
    });
}
exports.createValidOAuthTokens = createValidOAuthTokens;
