public void GetNinjaById() { INinjaRepository ninjaRepository = new NinjaRepository(); var ninja = ninjaRepository.GetById(1); Assert.IsNotNull(ninja); Assert.AreEqual(ninja.Id, 1); }
public void UpdateNinjaAndClan() { var ninjaRepository = new NinjaRepository(); var ninjaClanRepository = new NinjaClanRepository(); var ninja = ninjaRepository.GetById(1); var ninjaClan = ninjaClanRepository.GetById(ninja.NinjaClanId); ninja.NinjaName = "Murilo Cesar"; ninjaRepository.Update(ninja); ninjaRepository.Save(); ninjaClan.ClanName = "Gafanhotos"; ninjaClanRepository.Update(ninjaClan); ninjaClanRepository.Save(); }