// Delete existing developer private void DeleteExistingDeveloper() { DisplayAllDevelopers(); // Get the Developer ID of the developer they want to remove Console.WriteLine("\nEnter the Developer ID of the developer you'd like to remove:"); string devIDNumber = Console.ReadLine(); Developer newDeveloper = new Developer(); newDeveloper.IDNumber = int.Parse(devIDNumber); // Call the delete method bool wasDeleted = _programmerRepo.RemoveDeveloperFromList(newDeveloper.IDNumber); // If the content was deleted, say so // Otherwise state it could not be deleted if (wasDeleted) { Console.WriteLine("The developer was successfully deleted."); } else { Console.WriteLine("The developer could not be deleted."); } DevRepo _repo = new DevRepo(); }
public void DefaultValues() { _repo = new DevRepo(); _content = new DevContent("Brittany Beahan", 2, true); _repo.AddDevToList(_content); }
public void AddDevToList_ShouldGetNotNull() { DevContent content = new DevContent("Richard Torres", 1, true); DevRepo repository = new DevRepo(); repository.AddDevToList(content); DevContent contentfromDirectory = repository.GetDevContentByID(1); Assert.IsNotNull(contentfromDirectory); }
public ShippersController(NorthwindContext context, DevRepo repo) { _context = context; this.repo = repo; }