コード例 #1
0
        public void AddContentToDirectory_ShouldGetCorrectBool()
        {
            KomodoInsuranceContent content = new KomodoInsuranceContent();
            KomodoInsuranceRepo    repo    = new KomodoInsuranceRepo();

            bool addResult = repo.CreateNewBadge(content);

            Assert.IsTrue(addResult);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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();
        }
コード例 #4
0
 public void Arrange()
 {
     _kirepo  = new KomodoInsuranceRepo();
     _content = new KomodoInsuranceContent(9, "Derp");
     _kirepo.CreateNewBadge(_content);
 }