Example #1
0
        public void GetContentByBadgeId_Test()
        {
            //arrange
            _repo.seed();

            //act
            List <string> doors    = _repo.GetDoorsByBadgeId(1);
            int           actual   = doors.Count;
            int           expected = 4;


            //assert
            Assert.AreEqual(expected, actual);
        }
Example #2
0
        public void DeleteBadge()
        {
            Console.Clear();

            Dictionary <int, List <string> > badgeDict = _repo.ListOfBadgesAndDoors();

            Console.WriteLine("Enter the BadgeId that you are wanting to remove");
            int userInput = int.Parse(Console.ReadLine());

            foreach (var badgeId in badgeDict)
            {
                if (userInput == badgeId.Key)
                {
                    _repo.GetDoorsByBadgeId(badgeId.Key);
                    break;
                }
            }
        }