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()); } }
public void OphalenAlleRPGsInvoegenEnDanCount1() { //Arrange RPGRepositoryEFDB RPGRepo = new RPGRepositoryEFDB(); RPGRepo.Insert(new RPG()); //Act List <RPG> RPGs = RPGRepo.FindAll().ToList(); //Assert Assert.AreEqual(1, RPGs.Count()); }
public void OphalenAlleRPGsInvoegenEnDanCount1() { var options = DBContextGenerator(); //Arrange using (var context = new RPGContext(options)) { RPGRepositoryEFDB RPGRepo = new RPGRepositoryEFDB(context); //Act RPGRepo.Insert(new RPG()); } using (var context = new RPGContext(options)) { List <RPG> RPGs = context.RPGs.ToList(); //Assert Assert.AreEqual(1, RPGs.Count()); } }