public void GetDictionary_ShouldReturnTrue()
        {
            Dictionary <int, List <string> > dictionary = _repo.GetBadgeValuePairs();

            bool dictionaryHasKey = dictionary.ContainsKey(_badge.BadgeID);

            Assert.IsTrue(dictionaryHasKey);
        }
Esempio n. 2
0
        private void ListAllBadges()
        {
            Console.Clear();
            Dictionary <int, List <string> > badgeDictionary = _repo.GetBadgeValuePairs();

            Console.WriteLine("Key");
            Console.WriteLine("Badge #\t\t Door Access");

            foreach (KeyValuePair <int, List <string> > badge in badgeDictionary)
            {
                Console.WriteLine(" ");
                Console.Write($"{badge.Key}\t\t");
                foreach (string b in badge.Value)
                {
                    Console.Write($" {b}");
                }
            }
            Console.ReadKey();
        }