Example #1
0
        //update
        public void UpdateDoors()
        {
            Console.Clear();
            ViewAllDoors();
            Console.WriteLine("Enter Badge Id you would like to update");
            int badgeID = int.Parse(Console.ReadLine());

            Badge badge = badgesRepo.GetBadgeByBadgeID(badgeID);

            Console.WriteLine($"Badge ID: {badge.BadgeID}\n" +
                              $"Door Name: {badge.BadgeID}");
        }
Example #2
0
        public void GetBadgeByID()
        {
            //Arange
            BadgesRepo badgesRepo = new BadgesRepo();
            Badge      badgeToAdd = new Badge(2127, new List <string>
            {
                "A5", "A7", "A8"
            });

            _badgesRepo = new BadgesRepo();
            _badgesRepo.AddBadge(_badge);
            //Act
            Badge badgeById    = badgesRepo.GetBadgeByBadgeID(badgeToAdd.BadgeID);
            bool  isBadgeEqual = badgeToAdd.BadgeID == badgeToAdd.BadgeID;

            //Assert
            Assert.IsTrue(isBadgeEqual);
        }