Example #1
0
        protected void runBaseTest(WorkSchedule ws, Duration hoursPerRotation, Duration rotationDays,
                                   LocalDate instanceReference)
        {
            // toString
            if (testToString)
            {
                Console.WriteLine(ws.ToString());
                ws.PrintShiftInstances(instanceReference, instanceReference.PlusDays(rotationDays.Days));
            }

            Assert.IsTrue(ws.Name.Length > 0);
            Assert.IsTrue(ws.Description.Length > 0);
            Assert.IsTrue(ws.NonWorkingPeriods != null);

            // shifts
            TestShifts(ws);

            // teams
            TestTeams(ws, hoursPerRotation, rotationDays);

            // shift instances
            TestShiftInstances(ws, instanceReference);

            if (testDeletions)
            {
                TestDeletions();
            }
        }
        public void MaxValue_IsValid_Passes()
        {
            WorkSchedule parsedWorkshift = WorkSchedule.MaxValue;

            Expect(parsedWorkshift.ToString(), Is.EqualTo("ffffff-ffffff-ffffff-ffffff-ffffff-ffffff-ffffff"));
        }
 public string ToString_WithWorkshift_ReturnsString(WorkSchedule workshift)
 {
     return(workshift.ToString());
 }