Esempio n. 1
0
        public void Z_RemoveOpeningTest()
        {
            OpeningsService.RemoveOpening(Opening);
            var removedOpening = OpeningsService.GetOpeningFromId(Opening.Id);

            Assert.AreEqual(removedOpening.Id, -1);
        }
Esempio n. 2
0
        public void AddOpeningTest()
        {
            var random     = new Random();
            var newOpening = new Opening()
            {
                DateTimeStart         = DateTime.Now,
                DateTimeEnd           = DateTime.Now.AddDays(5),
                Company               = new Company(),
                HourlyPay             = random.Next(),
                Placements            = new List <Placement>(),
                RequiredQualification = new Qualification(),
                Job = new Job()
            };

            Opening = OpeningsService.AddOpening(newOpening);
        }
Esempio n. 3
0
        public void GetAllOpeningsTest()
        {
            var openings = OpeningsService.GetAllOpenings();

            foreach (var v in openings)
            {
                Console.WriteLine();
                Console.WriteLine($"Company Name\t\t{v.Company.Name}");
                Console.WriteLine($"Reqd QualificationsString\t{v.RequiredQualification.Code}");
                Console.WriteLine($"Placement Count\t{v.Placements.Count}");
                Console.WriteLine($"DateTime Start\t{v.DateTimeStart}");
                Console.WriteLine($"DateTime End\t{v.DateTimeEnd}");
                Console.WriteLine($"Hourly Pay\t\t{v.HourlyPay}");
                Console.WriteLine();
            }
        }
Esempio n. 4
0
        public void Y_TestAddedOpening()
        {
            var addedOpening = OpeningsService.GetOpeningFromId(Opening.Id);

            Assert.AreEqual(addedOpening.HourlyPay, Opening.HourlyPay);
        }
Esempio n. 5
0
        //[TestCase(1, 77f)]
        //[TestCase(2, 23f)]
        //[TestCase(3, 75f)]
        //[TestCase(4, 56f)]
        //[TestCase(5, 76f)]
        public void GetOpeningFromIdTest(int id, float result)
        {
            var opening = OpeningsService.GetOpeningFromId(id);

            Assert.AreEqual(opening.HourlyPay, result);
        }
Esempio n. 6
0
 public OpeningServiceTest()
 {
     TecAppContext   = new TecAppContext();
     OpeningsService = new OpeningsService(TecAppContext);
 }