Beispiel #1
0
        public void EditPost()
        {
            ITamagotchiRepository tamagotchiRepository  = new DummyTamagotchiRepository();
            TamagotchisController tamagotchisController = new TamagotchisController(tamagotchiRepository);
            TamagotchiModel       tam1 = tamagotchiRepository.Get(1);

            tam1.Level    = 85;
            tam1.Leeftijd = 72;

            tamagotchisController.Edit(tam1);

            Assert.AreEqual(tam1, tamagotchiRepository.Get(1));
        }
Beispiel #2
0
        public void DeleteConfirmed()
        {
            ITamagotchiRepository tamagotchiRepository  = new DummyTamagotchiRepository();
            TamagotchisController tamagotchisController = new TamagotchisController(tamagotchiRepository);
            TamagotchiModel       subject = tamagotchiRepository.Get(2);

            tamagotchisController.DeleteConfirmed(2);

            Assert.IsTrue(!tamagotchiRepository.GetAll().Contains(subject));
        }