Exemplo n.º 1
0
        public void Z_RemoveQualificationTest()
        {
            QualificationsService.RemoveQualification(Qualification);
            var removedQualification = QualificationsService.GetQualificationFromId(Qualification.Id);

            Assert.AreEqual(removedQualification.Id, -1);
        }
Exemplo n.º 2
0
        public void AddQualificationTest()
        {
            var random           = new Random();
            var newQualification = new Qualification()
            {
                CandidatesQualifications = new List <Candidate_Qualification>(),
                Code                            = $"Code-{random.Next()}",
                Description                     = $"Description-{random.Next()}",
                Openings                        = new List <Opening>(),
                PrerequisitesForCourse          = new List <PrerequisitesForCourse>(),
                QualificationsDevelopedByCourse = new List <QualificationDevelopedByCourse>()
            };

            Qualification = QualificationsService.AddQualification(newQualification);
        }
Exemplo n.º 3
0
        public void GetAllQualificationsTest()
        {
            var qualifications = QualificationsService.GetAllQualifications();

            foreach (var v in qualifications)
            {
                Console.WriteLine();
                Console.WriteLine($"{v.Code}");
                Console.WriteLine($"{v.Description}");
                Console.WriteLine($"{v.QualificationsDevelopedByCourse}");
                Console.WriteLine($"{v.CandidatesQualifications.Count}");
                Console.WriteLine($"{v.Openings.Count}");
                Console.WriteLine($"{v.PrerequisitesForCourse.Count}");
                Console.WriteLine();
            }
        }
Exemplo n.º 4
0
        public void Y_TestAddedQualification()
        {
            var addedQualification = QualificationsService.GetQualificationFromId(Qualification.Id);

            Assert.AreEqual(addedQualification.Id, Qualification.Id);
        }
Exemplo n.º 5
0
        //[TestCase(1, "SEC-45")]
        //[TestCase(2, "SEC-60")]
        //[TestCase(3, "CLERK")]
        //[TestCase(4, "PRG-VB")]
        public void GetQualificationFromIdTest(int id, string result)
        {
            var qualification = QualificationsService.GetQualificationFromId(id);

            Assert.AreEqual(qualification.Code, result);
        }
Exemplo n.º 6
0
 public QualificationServiceTest()
 {
     TecAppContext         = new TecAppContext();
     QualificationsService = new QualificationsService(TecAppContext);
 }