Ejemplo n.º 1
0
        public void AddPlatformTranslate(string type, string lang, Guid platformId)
        {
            var platformTranslate = new PlatformTranslation
            {
                EntityId = platformId,
                Name     = type
            };

            _platformTranslate.AddTranslate(platformTranslate, lang);
        }
Ejemplo n.º 2
0
 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()
     };
 }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 private void InitializeTestData()
 {
     _platformTranslation = new PlatformTranslation {
         Name = "Genre"
     };
 }