public void LijstRPGsOphalenOpBasisVanRPGSysteemMeerdereInserts() { var options = DBContextGenerator(); //Arrange using (var context = new RPGContext(options)) { RPGRepositoryEFDB RPGRepo = new RPGRepositoryEFDB(context); //Act RPGRepo.Insert(new RPG { RPGSysteem = RPGSystemen.MistbornAdventureGame }); RPGRepo.Insert(new RPG()); } using (var context = new RPGContext(options)) { RPGRepositoryEFDB RPGRepo = new RPGRepositoryEFDB(context); List <RPG> RPGs = (List <RPG>)RPGRepo.FindBy(t => t.RPGSysteem == RPGSystemen.MistbornAdventureGame); //Assert Assert.AreEqual(1, RPGs.Count()); } }
public void RPGToevoegenEnVervolgensVerwijderen() { var options = DBContextGenerator(); //Arrange using (var context = new RPGContext(options)) { RPGRepositoryEFDB RPGRepo = new RPGRepositoryEFDB(context); RPG RPG = new RPG { RPGSysteem = RPGSystemen.MistbornAdventureGame }; //Act RPGRepo.Insert(new RPG()); } using (var context = new RPGContext(options)) { RPGRepositoryEFDB RPGRepo = new RPGRepositoryEFDB(context); List <RPG> RPGs = (List <RPG>)RPGRepo.FindBy(t => t.RPGSysteem == RPGSystemen.MistbornAdventureGame); List <RPG> RPGs2 = (List <RPG>)RPGRepo.FindAll(); //Assert Assert.AreEqual(0, RPGs.Count()); } }