public GameTranslatorTest() { InitializeTestData(); _unitOfWork = new Mock <IUnitOfWork>(); var languageRepository = new Mock <ICrudRepository <Language> >(); _languageGameRepository = new Mock <ICrudRepository <GameTranslation> >(); languageRepository.Setup(l => l.FirstOrDefault(It.IsAny <Expression <Func <Language, bool> > >())) .Returns(new Language()); _unitOfWork.Setup(uow => uow.GetRepository <ICrudRepository <Language> >(RepositoryType.SQL)).Returns(languageRepository.Object); _unitOfWork.Setup(uow => uow.GetRepository <ICrudRepository <GameTranslation> >(RepositoryType.SQL)).Returns(_languageGameRepository.Object); _gameTranslator = new GameTranslator(_unitOfWork.Object); }
public MainMenuViewModel(GameTranslator gameTranslator) : base(gameTranslator) { }