Esempio n. 1
0
        public void AddADoor()
        {
            Console.WriteLine("Enter the badge key to select a badge you would like to add a door to.");



            //this is the inside of ListAllBadges
            //foreach (KeyValuePair<int, BadgesPOCOs> badge in _badgeRepo.ViewAllBadges())
            //{
            //    DisplayBadgeDetails(badge);
            //}
            ListAllBadges();


            int         userBadgeKey = int.Parse(Console.ReadLine());
            BadgesPOCOs addingADoor  = new BadgesPOCOs();



            Setup(addingADoor);



            bool isSuccessful = _badgeRepo.AddingDoor(userBadgeKey, addingADoor.DoorAccess);

            if (isSuccessful)
            {
                Console.WriteLine("Success");
            }
            else
            {
                Console.WriteLine("Exiting to Menu");
            }
            Console.ReadKey();
        }
        public void AddingADoor()
        {
            //passes but unsure if correct
            List <DoorAccess> content = new List <DoorAccess>(new List <DoorAccess> {
                DoorAccess.A3, DoorAccess.A5
            });


            bool addResult = _repo.AddingDoor(1, content);

            Assert.IsTrue(addResult);
        }