Exemplo n.º 1
0
        public void Delete()
        {
            TamagotchisController tamagotchisController = new TamagotchisController(new DummyTamagotchiRepository());

            // Act
            ViewResult result = tamagotchisController.Edit(1) as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }
Exemplo n.º 2
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));
        }