public void RetrieveAttendanceTimes_WhenCalled_ReturnsListOfAllAttendanceTimes()
        {
            ContactInformation contactInformation = null;
            Employee           employee           = null;

            Expect(() => { contactInformation = AutomatedAttendanceSystem.CreateContactInformation(CommonTestCaseSourceProvider.newContactInformationSample()); }, Throws.Nothing);
            Expect(() => { employee = AutomatedAttendanceSystem.CreateEmployee(CommonTestCaseSourceProvider.newEmployeeSample(contactInformation)); }, Throws.Nothing);
            Expect(() => { PersistenceObjectRepository <AttendanceTime> .Create(CommonTestCaseSourceProvider.newAttendanceTimeSample(employee)); }, Throws.Nothing);
            Expect(() => AutomatedAttendanceSystem.RetrieveAttendanceTimes().Count, Is.GreaterThan(0));
        }
        public void RetrieveAttendaceTimes_WhenCalledAfterRetrieveEmployees_Passes()
        {
            //Data
            var employee       = CommonTestCaseSourceProvider.newEmployeeSample();
            var attendanceTime = CommonTestCaseSourceProvider.newAttendanceTimeSample(employee);

            //Tests
            Expect(() => employee       = AutomatedAttendanceSystem.CreateEmployee(employee), Throws.Nothing);
            Expect(() => attendanceTime = PersistenceObjectRepository <AttendanceTime> .Create(attendanceTime), Throws.Nothing);

            Expect(() => AutomatedAttendanceSystem.RetrieveEmployees(), Throws.Nothing);
            Expect(() => AutomatedAttendanceSystem.RetrieveEmployees(), Is.Not.Empty);
            Expect(() => AutomatedAttendanceSystem.RetrieveAttendanceTimes(), Throws.Nothing);
            Expect(() => AutomatedAttendanceSystem.RetrieveAttendanceTimes(), Is.Not.Empty);
        }
        public void RetrieveAttendaceTimes_WhenCalled_ReturnsAllAttendanceTimes()
        {
            //Data
            var employee       = CommonTestCaseSourceProvider.newEmployeeSample();
            var attendanceTime = CommonTestCaseSourceProvider.newAttendanceTimeSample(employee);

            //Tests
            Expect(() => employee       = AutomatedAttendanceSystem.CreateEmployee(employee), Throws.Nothing);
            Expect(() => attendanceTime = PersistenceObjectRepository <AttendanceTime> .Create(attendanceTime), Throws.Nothing);

            Expect(() => AutomatedAttendanceSystem.RetrieveAttendanceTimes().Count, Is.EqualTo(1));
            Expect(() => AutomatedAttendanceSystem.RetrieveAttendanceTimes(), Is.TypeOf <List <AttendanceTime> >());
            Expect(() => AutomatedAttendanceSystem.RetrieveAttendanceTimes()[0], Is.TypeOf <AttendanceTime>());
            Expect(() => AutomatedAttendanceSystem.RetrieveAttendanceTimes()[0], Is.EqualTo(attendanceTime));
        }
        public void RetrieveAttendaceTimes_WhenCalled_EmployeeMemberIsAccessible()
        {
            //Data
            var employee       = CommonTestCaseSourceProvider.newEmployeeSample();
            var attendanceTime = CommonTestCaseSourceProvider.newAttendanceTimeSample(employee);

            //Tests
            Expect(() => employee       = AutomatedAttendanceSystem.CreateEmployee(employee), Throws.Nothing);
            Expect(() => attendanceTime = PersistenceObjectRepository <AttendanceTime> .Create(attendanceTime), Throws.Nothing);

            //Is not empty
            Expect(() => AutomatedAttendanceSystem.RetrieveAttendanceTimes(), Throws.Nothing);
            Expect(() => AutomatedAttendanceSystem.RetrieveAttendanceTimes(), Is.Not.Empty);

            //Employee is accesisble
            Expect(() => AutomatedAttendanceSystem.RetrieveAttendanceTimes()[0].Employee, Is.Not.Null);
            Expect(() => AutomatedAttendanceSystem.RetrieveAttendanceTimes()[0].Employee, Is.EqualTo(employee));
        }