public void AddContentToDirectory_ShouldGetCorrectBool() { KomodoInsuranceContent content = new KomodoInsuranceContent(); KomodoInsuranceRepo repo = new KomodoInsuranceRepo(); bool addResult = repo.CreateNewBadge(content); Assert.IsTrue(addResult); }
public void GetAllDirectory_ShouldReturnCorrectList() { KomodoInsuranceContent testContent = new KomodoInsuranceContent(); KomodoInsuranceRepo repo = new KomodoInsuranceRepo(); repo.CreateNewBadge(testContent); List <KomodoInsuranceContent> testList = repo.GetAllKeysAndValues(); bool directoryHasContent = testList.Contains(testContent); Assert.IsTrue(directoryHasContent); }
private void CreateNewBadge() { Console.Clear(); KomodoInsuranceContent content = new KomodoInsuranceContent(); Console.Write("Please enter a new badge ID (ex: 1, 10, 100, etc...)"); content.BadgeID = int.Parse(Console.ReadLine()); Console.Write("Please enter a new door access list (ex: A1, B2, C3, etc...)"); content.ListOfDoorNames = Console.ReadLine(); bool added = _kiRepo.CreateNewBadge(content); if (added) { Console.Write("Your badge(s) have been added "); } else { Console.Write("There has been an error, please try again "); } Console.WriteLine("Please press any key to continue"); Console.ReadKey(); }
public void Arrange() { _kirepo = new KomodoInsuranceRepo(); _content = new KomodoInsuranceContent(9, "Derp"); _kirepo.CreateNewBadge(_content); }