refactor use cases
This commit is contained in:
@@ -1,28 +1,27 @@
|
||||
import { describe, it, expect, vi, type Mock } from 'vitest';
|
||||
import {
|
||||
GetNotificationPreferencesQuery,
|
||||
UpdateChannelPreferenceUseCase,
|
||||
UpdateTypePreferenceUseCase,
|
||||
UpdateQuietHoursUseCase,
|
||||
SetDigestModeUseCase,
|
||||
type GetNotificationPreferencesInput,
|
||||
type GetNotificationPreferencesResult,
|
||||
type UpdateChannelPreferenceCommand,
|
||||
type UpdateChannelPreferenceResult,
|
||||
type UpdateTypePreferenceCommand,
|
||||
type UpdateTypePreferenceResult,
|
||||
type UpdateQuietHoursCommand,
|
||||
type UpdateQuietHoursResult,
|
||||
type SetDigestModeCommand,
|
||||
type SetDigestModeResult,
|
||||
} from './NotificationPreferencesUseCases';
|
||||
import type { INotificationPreferenceRepository } from '../../domain/repositories/INotificationPreferenceRepository';
|
||||
import type { NotificationPreference , ChannelPreference, TypePreference } from '../../domain/entities/NotificationPreference';
|
||||
import type { Logger, UseCaseOutputPort } from '@core/shared/application';
|
||||
import { Result } from '@core/shared/application/Result';
|
||||
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
|
||||
import { describe, expect, it, vi, type Mock } from 'vitest';
|
||||
import type { ChannelPreference, NotificationPreference, TypePreference } from '../../domain/entities/NotificationPreference';
|
||||
import type { INotificationPreferenceRepository } from '../../domain/repositories/INotificationPreferenceRepository';
|
||||
import type { NotificationChannel, NotificationType } from '../../domain/types/NotificationTypes';
|
||||
import { NotificationDomainError } from '../../domain/errors/NotificationDomainError';
|
||||
import {
|
||||
GetNotificationPreferencesQuery,
|
||||
SetDigestModeUseCase,
|
||||
UpdateChannelPreferenceUseCase,
|
||||
UpdateQuietHoursUseCase,
|
||||
UpdateTypePreferenceUseCase,
|
||||
type GetNotificationPreferencesInput,
|
||||
type GetNotificationPreferencesResult,
|
||||
type SetDigestModeCommand,
|
||||
type SetDigestModeResult,
|
||||
type UpdateChannelPreferenceCommand,
|
||||
type UpdateChannelPreferenceResult,
|
||||
type UpdateQuietHoursCommand,
|
||||
type UpdateQuietHoursResult,
|
||||
type UpdateTypePreferenceCommand,
|
||||
type UpdateTypePreferenceResult,
|
||||
} from './NotificationPreferencesUseCases';
|
||||
|
||||
describe('NotificationPreferencesUseCases', () => {
|
||||
let preferenceRepository: {
|
||||
|
||||
Reference in New Issue
Block a user