Exemplo n.º 1
0
        public void getAllWorkingDaysTest()
        {
            WorkingdaysService target = new WorkingdaysService(dbContext); // TODO: Initialize to an appropriate value
            WorkingDay expected1 = new WorkingDay();
            WorkingDay expected2 = new WorkingDay();

            expected1.WorkingDayID = 1;
            expected2.WorkingDayID = 2;

            expected1.WorkingDays = "Mon";
            expected2.WorkingDays = "Tue";

            dbContext.WorkingDays.Add(expected1);
            dbContext.WorkingDays.Add(expected2);

            List<WorkingDay> expected = new List<WorkingDay>(); // TODO: Initialize to an appropriate value
            expected.Add(expected1);
            expected.Add(expected2);

            List<WorkingDay> actual;
            actual = target.getAllWorkingDays();
            Assert.AreEqual(expected.Count, actual.Count);
            Assert.AreEqual(expected[0].WorkingDayID, actual[0].WorkingDayID);
            Assert.AreEqual(expected[1].WorkingDays, actual[1].WorkingDays);

            dbContext.WorkingDays.Remove(expected1);
            dbContext.WorkingDays.Remove(expected2);
        }
Exemplo n.º 2
0
 public void WorkingdaysServiceConstructorTest()
 {
     IEmpDBContext workingdayDBContext = null; // TODO: Initialize to an appropriate value
     WorkingdaysService target = new WorkingdaysService(workingdayDBContext);
     Assert.Inconclusive("TODO: Implement code to verify target");
 }
Exemplo n.º 3
0
 public void getSelectedWorkingdayTest()
 {
     WorkingdaysService target = new WorkingdaysService(dbContext); // TODO: Initialize to an appropriate value
     WorkingDay expected = new WorkingDay();
     expected.WorkingDayID = 1;
     expected.WorkingDays = "Wed";
     dbContext.WorkingDays.Add(expected);
     dbContext.SaveChanges();
     WorkingDay actual;
     actual = target.getSelectedWorkingday(expected.WorkingDayID);
     Assert.AreEqual(expected, actual);
     dbContext.WorkingDays.Remove(expected);
 }