Exemple #1
0
        public void AddABadge()
        {
            BadgesPOCOs newBadge = new BadgesPOCOs();

            Console.WriteLine("What is the number on the badge?");
            int userInputBadgeNumber = int.Parse(Console.ReadLine());

            newBadge.BadgeID = userInputBadgeNumber;

            //this is for adding doors to a badge
            Setup(newBadge);



            bool isSuccessful = _badgeRepo.AddNewBadge(newBadge);

            if (isSuccessful)
            {
                Console.WriteLine("Successful");
            }
            else
            {
                Console.WriteLine("Failed");
            }

            Console.ReadKey();
        }
        public void Arrange()
        {
            _repo    = new BadgesRepo();
            _content = new BadgesPOCOs(12345, new List <DoorAccess> {
                DoorAccess.A3, DoorAccess.A5
            });

            _repo.AddNewBadge(_content);
        }
        public void AddNewBadge()
        {
            BadgesPOCOs content    = new BadgesPOCOs();
            BadgesRepo  repository = new BadgesRepo();

            bool addResult = repository.AddNewBadge(content);

            Assert.IsTrue(addResult);
        }
Exemple #4
0
        public void GetThisPartyStarted()
        {
            _repo   = new BadgesRepo();
            _badges = new BadgesPoco(1150, new List <string>()
            {
                "A1"
            });

            _repo.AddNewBadge(_badges);
        }