Exemplo n.º 1
0
        public void RoomAdd(int badgeID)
        {
            Console.WriteLine("List a room this badge has access to:");
            string roomAccess = Console.ReadLine();

            _badgeRepo.AddRoomToBadge(badgeID, roomAccess);
            Console.WriteLine("Any other rooms? (y/n)");
            string moreRooms = Console.ReadLine();

            while (moreRooms == "y")
            {
                Console.WriteLine("List a room this badge has access to:");
                roomAccess = Console.ReadLine();
                _badgeRepo.AddRoomToBadge(badgeID, roomAccess);
                Console.WriteLine("Any other rooms? (y/n)");
                moreRooms = Console.ReadLine();
            }
        }
Exemplo n.º 2
0
        public void AddRoomToBadgeTest()
        {
            _repo.Seed();
            bool isAdded = false;

            _repo.AddRoomToBadge(111, "A111");

            List <string> rooms = _repo.GetListOfBadges()[111];

            foreach (string room in rooms)
            {
                if (room == "A111")
                {
                    isAdded = true;
                }
            }
            Assert.IsTrue(isAdded);
        }