コード例 #1
0
        public void GetAllBadges_ShouldReturnCorrectDict()
        {
            List <string> doors = new List <string>()
            {
                "A1", "B12", "C4"
            };
            Badge     badge = new Badge(45, doors);
            badgeRepo repo  = new badgeRepo();

            repo.AddBadgeToDirectory(badge);

            Dictionary <int, List <string> > testDict = repo.GetAllBadges();
        }
コード例 #2
0
        public void ShowDoors()
        {
            Dictionary <int, List <string> > listOfBadges = _repository.GetAllBadges();

            Console.WriteLine("");
            foreach (KeyValuePair <int, List <string> > badge in listOfBadges)
            {
                Console.WriteLine($"Badge: {badge.Key}");

                foreach (string door in badge.Value)
                {
                    Console.WriteLine(door);
                }
                Console.WriteLine("+++++++++++++++");
            }
            Console.WriteLine("\nPress any key to return to the menu...");
            Console.ReadLine();
        }