예제 #1
0
        public void AddBadge_ShouldReturnTrue()
        {
            //Arrange
            Badge badge = new Badge(3, new List <string>()
            {
                "A2", "A7"
            });
            int beforeCount = _repo.GetList().Count;

            //Act
            _repo.AddBadge(badge);
            int afterCount = _repo.GetList().Count;

            //Assert
            Assert.IsTrue(afterCount > beforeCount);
        }
        //3 - list
        public void ListAllBadges()
        {
            Dictionary <int, List <string> > BadgeList = _badgeRepo.GetList();

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

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