TranslateServiceMock.ts 816 Bytes
Newer Older
Christopher Mark Fullarton's avatar
Christopher Mark Fullarton committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
import {
  FakeMissingTranslationHandler,
  MissingTranslationHandler,
  TranslateCompiler,
  TranslateDefaultParser,
  TranslateFakeCompiler,
  TranslateFakeLoader,
  TranslateLoader,
  TranslateParser,
  TranslateService,
  TranslateStore,
} from '@ngx-translate/core';

export class TranslateServiceMock extends TranslateService {
  constructor() {
    const translateStore: TranslateStore = new TranslateStore();
    const currentLoader: TranslateLoader = new TranslateFakeLoader();
    const compiler: TranslateCompiler = new TranslateFakeCompiler();
    const parser: TranslateParser = new TranslateDefaultParser();
    const missingTranslationParser: MissingTranslationHandler = new FakeMissingTranslationHandler();

    super(translateStore, currentLoader, compiler, parser, missingTranslationParser);
  }
}