//Delete private void DeleteExistingBadge() { Console.Clear(); ViewAllDoors(); Console.WriteLine("Enter Id of the door you would like to remove:"); int badgeId = int.Parse(Console.ReadLine()); Console.Clear(); var doorToDelete = badgesRepo.GetBadgeByBadgeID(badgeId); Console.WriteLine("Are you sure you want to remove :(yes or no) "); foreach (var item in doorToDelete.DoorName) { Console.WriteLine(" " + item); } string ans = Console.ReadLine(); if (ans.ToLower() == "yes" || ans.ToLower() == "y") { if (badgesRepo.DeleteAllDoors(badgeId)) { Console.WriteLine("The Id was successfully deleted"); } else { Console.WriteLine("The Id could not be deleted"); } } }
//Delete public void RemoveBadge() { //Arange //Act bool removeBadge = _badgesRepo.DeleteAllDoors(_badge.BadgeID); //Assert Assert.IsTrue(removeBadge); }