public void Test_Adding_A_GameObject() { var context = new UniAppKidsDbContext(); var aGenericRepository = new GenericRepository <GameObject>(context); GameObject aGameObject = new GameObject(); aGameObject.Description = "Wordsoup"; aGenericRepository.Insert(aGameObject); context.SaveChanges(); }
public void Test_If_can_Updat_Data_Of_list_of_words() { var context = new UniAppKidsDbContext(); var aWordRepository = new WordRepository(context); List <Word> listOfWords; FakeEntityModels.FakeWordModel.GetListOfWordsToVerify(out listOfWords); aWordRepository.UpdatePropertiesOfRepeatedWords(listOfWords); }
public void Test_If_Two_Entitities_Are_TheSame() { var context = new UniAppKidsDbContext(); var aGenericRepository = new GenericRepository <Word>(context); List <Word> listOfWords; FakeEntityModels.FakeWordModel.GetListOfWordsToVerify(out listOfWords); var resultComparation = aGenericRepository.Compare(listOfWords[0], listOfWords[1]); Assert.IsFalse(resultComparation); //resultComparation = aGenericRepository.Compare(listOfWords[0], listOfWords[2]); //Assert.IsFalse(resultComparation); }
public void Test_Adding_A_GameList_With_ExistingID() { var context = new UniAppKidsDbContext(); var aGenericRepository = new GenericRepository <GameList>(context); GameList aGameList = new GameList() { GameName = "http://en.educaplay.com/en/learningresources/1696028/html5/nombres_propios.htm#!", DifficultyLevel = 1, AssignedGameObjectId = 1 }; aGenericRepository.Insert(aGameList); context.SaveChanges(); }
public void Test_If_List_Is_Holding_Wods_Not_Existing_In_DB() { var context = new UniAppKidsDbContext(); var aWordRepository = new WordRepository(context); List <Word> listOfWords; FakeEntityModels.FakeWordModel.GetListOfWordsToVerify(out listOfWords); List <Word> wordsToupdate; var nonRepeatedList = aWordRepository.GetListOfNotExistingWords(listOfWords, out wordsToupdate); foreach (var aNonRepeatedWord in nonRepeatedList) { Assert.AreNotSame("casa", aNonRepeatedWord); } }
public PhraseRepository(UniAppKidsDbContext uniAppKidsDbContext) { context = uniAppKidsDbContext; }
public GenericRepository(UniAppKidsDbContext context) { this.context = context; this.dbSet = context.Set <TEntity>(); }
public PhraseDictionaryRepository(UniAppKidsDbContext context) : base(context) { }
public UnitOfWork(UniAppKidsDbContext _context) { context = _context; }
public WordRepository(UniAppKidsDbContext uniAppKidsDbContext) : base(uniAppKidsDbContext) { context = uniAppKidsDbContext; aGenericRepository = new GenericRepository <Word>(context); }