Esempio n. 1
0
        protected void admin_DeleteGetAction_ViewModelNotNull()
        {
            // Act / action
            var result = controller.Delete(id) as ViewResult;

            // Assert
            Assert.IsNotNull(result);
            Assert.IsNotNull(result.Model);
        }
Esempio n. 2
0
        public void DeleteOwner()
        {
            Console.WriteLine("Podaj numer właściciela do usunięcia :");
            string stringId = Console.ReadLine();

            try
            {
                int id = Int32.Parse(stringId);
                var ownerController = new OwnerController();
                ownerController.Delete(id);
            }
            catch (FormatException e)
            {
                Console.WriteLine(e.Message);
            }
        }