Example #1
0
        //Create new Developer
        private void CreateNewDeveloper()
        {
            Developer newDeveloper = new Developer();

            //Full Name
            Console.WriteLine("Enter the name of the Developer:");
            newDeveloper.FullName = Console.ReadLine();

            //DevID
            Console.WriteLine("Enter the DevID for the Developer:");
            string devIdAsString = Console.ReadLine();

            newDeveloper.DevId = int.Parse(devIdAsString);

            //PluralSight Access
            Console.WriteLine("Does the Developer have Pluralsight Access? (y or n)");
            string hasPluralAccessString = Console.ReadLine().ToLower();

            if (hasPluralAccessString == "y")
            {
                newDeveloper.HasPluralsightAccess = true;
            }
            else
            {
                newDeveloper.HasPluralsightAccess = false;
            }

            _contentDevRepo.AddDevlopersToList(newDeveloper);
        }
        public void Arrange()
        {
            _repo    = new Developer_Repository();
            _content = new Developer("Daniele Thomas", 112, true, 3);

            _repo.AddDevlopersToList(_content);
        }
        public void AddToList_ShouldGetNotNull()
        {   //Arrange
            Developer content = new Developer();

            content.FullName = "Daniele Thomas";
            Developer_Repository repository = new Developer_Repository();

            //Act
            repository.AddDevlopersToList(content);
            Developer contentFromDirectory = repository.GetDeveloperByDeveloperName("Daniele Thomas");

            //Assert
            Assert.IsNotNull(contentFromDirectory);
        }