public void AddPlatformTranslate(string type, string lang, Guid platformId) { var platformTranslate = new PlatformTranslation { EntityId = platformId, Name = type }; _platformTranslate.AddTranslate(platformTranslate, lang); }
private void InitializeTestData(out PlatformTranslation platformTranslation) { platformTranslation = new PlatformTranslation { Id = Guid.NewGuid(), EntityId = Guid.NewGuid(), Language = new Language(), LanguageId = Guid.NewGuid(), Name = "name", Platform = new Platform() }; }
public PlatformTranslationProviderTest() { _platform = new PlatformTranslation { Name = "platform name" }; _unitOfWork = new Mock <IUnitOfWork>(); _languageRepository = new Mock <ICrudRepository <Language> >(); _platformTranslationRepository = new Mock <ICrudRepository <PlatformTranslation> >(); _unitOfWork.Setup(u => u.GetRepository <ICrudRepository <Language> >(RepositoryType.SQL)).Returns(_languageRepository.Object); _unitOfWork.Setup(u => u.GetRepository <ICrudRepository <PlatformTranslation> >(RepositoryType.SQL)).Returns(_platformTranslationRepository.Object); _platformTranslationRepository .Setup(gt => gt.FirstOrDefault(It.IsAny <Expression <Func <PlatformTranslation, bool> > >())) .Returns(_platform); _platformTranslation = new PlatformTranslationProvider(_unitOfWork.Object); }
private void InitializeTestData() { _platformTranslation = new PlatformTranslation { Name = "Genre" }; }