website refactor
This commit is contained in:
@@ -13,15 +13,15 @@ import { UserRatingRepository } from '../../domain/repositories/UserRatingReposi
|
||||
import { ExternalGameRatingRepository } from '../../domain/repositories/ExternalGameRatingRepository';
|
||||
|
||||
describe('GetLeagueEligibilityPreviewQuery', () => {
|
||||
let mockUserRatingRepo: IUserRatingRepository;
|
||||
let mockExternalRatingRepo: IExternalGameRatingRepository;
|
||||
let mockUserRatingRepo: UserRatingRepository;
|
||||
let mockExternalRatingRepo: ExternalGameRatingRepository;
|
||||
let handler: GetLeagueEligibilityPreviewQueryHandler;
|
||||
|
||||
beforeEach(() => {
|
||||
mockUserRatingRepo = {
|
||||
findByUserId: vi.fn(),
|
||||
save: vi.fn(),
|
||||
} as unknown as IUserRatingRepository;
|
||||
} as unknown as UserRatingRepository;
|
||||
|
||||
mockExternalRatingRepo = {
|
||||
findByUserId: vi.fn(),
|
||||
@@ -32,7 +32,7 @@ describe('GetLeagueEligibilityPreviewQuery', () => {
|
||||
delete: vi.fn(),
|
||||
exists: vi.fn(),
|
||||
findProfilesPaginated: vi.fn(),
|
||||
} as unknown as IExternalGameRatingRepository;
|
||||
} as unknown as ExternalGameRatingRepository;
|
||||
|
||||
handler = new GetLeagueEligibilityPreviewQueryHandler(
|
||||
mockUserRatingRepo,
|
||||
|
||||
@@ -21,8 +21,8 @@ export class GetLeagueEligibilityPreviewQueryHandler {
|
||||
private readonly evaluator: EligibilityEvaluator;
|
||||
|
||||
constructor(
|
||||
private readonly userRatingRepo: IUserRatingRepository,
|
||||
private readonly externalRatingRepo: IExternalGameRatingRepository
|
||||
private readonly userRatingRepo: UserRatingRepository,
|
||||
private readonly externalRatingRepo: ExternalGameRatingRepository
|
||||
) {
|
||||
this.evaluator = new EligibilityEvaluator();
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ export interface GetUserRatingLedgerQuery {
|
||||
|
||||
export class GetUserRatingLedgerQueryHandler {
|
||||
constructor(
|
||||
private readonly ratingEventRepo: IRatingEventRepository
|
||||
private readonly ratingEventRepo: RatingEventRepository
|
||||
) {}
|
||||
|
||||
async execute(query: GetUserRatingLedgerQuery): Promise<PaginatedLedgerResult> {
|
||||
|
||||
@@ -16,9 +16,9 @@ export interface GetUserRatingsSummaryQuery {
|
||||
|
||||
export class GetUserRatingsSummaryQueryHandler {
|
||||
constructor(
|
||||
private readonly userRatingRepo: IUserRatingRepository,
|
||||
private readonly externalRatingRepo: IExternalGameRatingRepository,
|
||||
private readonly ratingEventRepo: IRatingEventRepository
|
||||
private readonly userRatingRepo: UserRatingRepository,
|
||||
private readonly externalRatingRepo: ExternalGameRatingRepository,
|
||||
private readonly ratingEventRepo: RatingEventRepository
|
||||
) {}
|
||||
|
||||
async execute(query: GetUserRatingsSummaryQuery): Promise<RatingSummaryDto> {
|
||||
|
||||
Reference in New Issue
Block a user