public ActionResult BuryPet(int id) { TamagotchiPet pet = TamagotchiPet.Find(id); pet.Bury(); List <TamagotchiPet> allPets = TamagotchiPet.GetAll(); return(View("DisplayPetData", allPets)); }
public ActionResult Decay() { List <TamagotchiPet> allPets = TamagotchiPet.GetAll(); foreach (TamagotchiPet pet in allPets) { pet.RunLifeCycle(); } return(View("DisplayPetData", allPets)); }
public void GetAll_GetsAllInstancesOfTamagotchiPet_List() { TamagotchiPet pet1 = new TamagotchiPet("Antony"); TamagotchiPet pet2 = new TamagotchiPet("Jonathon"); TamagotchiPet pet3 = new TamagotchiPet("Karamo"); List <TamagotchiPet> TamagotchiPetList = new List <TamagotchiPet> { pet1, pet2, pet3 }; CollectionAssert.AreEqual(TamagotchiPetList, TamagotchiPet.GetAll()); }
public void ClearAll_ClearsAllInstancesOfBasket_Int() { TamagotchiPet pet1 = new TamagotchiPet("Antony"); TamagotchiPet pet2 = new TamagotchiPet("Jonathon"); TamagotchiPet pet3 = new TamagotchiPet("Karamo"); TamagotchiPet.ClearAll(); List <TamagotchiPet> emptyList = new List <TamagotchiPet>() { }; CollectionAssert.AreEqual(emptyList, TamagotchiPet.GetAll()); }
public ActionResult Index() { List <TamagotchiPet> allPets = TamagotchiPet.GetAll(); return(View(allPets)); }