public void TestVolunteerShiftManagerAddsNewShift()
        {
            //Arrange
            IVolunteerShiftManager manager = new VolunteerShiftManager(_fakeShiftAccessor);

            //Act
            int rows = manager.AddVolunteerShift(new VolunteerShiftVM()
            {
                VolunteerShiftID   = 100,
                VolunteerID        = 1,
                ShiftTitle         = "The Shift",
                IsSpecialEvent     = false,
                VolunteerShiftDate = DateTime.Now,
                ScheduleID         = 100,
                ShiftNotes         = "This shift is cool",
                VolunteerTaskID    = 100,
                Recurrance         = "None",
                ShiftDescription   = "This is a cool shift",
                ShiftStartTime     = TimeSpan.Zero,
                ShiftEndTime       = TimeSpan.Zero + TimeSpan.Parse("00:06:00:00")
            });

            //Assert
            Assert.AreEqual(1, rows);
        }
        public void TestVolunteerShiftManagerEditAShiftRecord()
        {
            //Arrange
            IVolunteerShiftManager manager = new VolunteerShiftManager(_fakeShiftAccessor);

            //Act
            int rows = manager.EditVolunteerShift(
                new VolunteerShiftVM()
            {
                VolunteerShiftID = 1
            },
                new VolunteerShiftVM()
            {
                VolunteerShiftID   = 1,
                ShiftDescription   = "Hello World!",
                VolunteerShiftDate = DateTime.Now,
                ShiftTitle         = "This is the title",
                ShiftStartTime     = TimeSpan.Zero,
                ShiftEndTime       = TimeSpan.Zero,
                Recurrance         = "None",
                IsSpecialEvent     = true,
                ShiftNotes         = "These are the notes2",
                ScheduleID         = 0
            }
                );

            //Assert
            Assert.AreEqual(1, rows);
        }
        public void testVolunteerShiftManagerCancelVolunteerShift()
        {
            IVolunteerShiftManager manager = new VolunteerShiftManager(_fakeShiftAccessor);

            int rows = manager.CancelVolunteerShift(1000001, 1000001);

            Assert.AreEqual(1, rows);
        }
        public void testVolunteerShiftManagerSelectShift()
        {
            IVolunteerShiftManager manager = new VolunteerShiftManager(_fakeShiftAccessor);

            int shiftID = manager.SelectVolunteerShift(1).VolunteerShiftID;

            Assert.AreEqual(shiftID, 1);
        }
        public void testVolunteerShiftManagerReturnAllShiftsForAVolunteer()
        {
            IVolunteerShiftManager manager = new VolunteerShiftManager(_fakeShiftAccessor);

            List <VolunteerShiftVM> shifts =
                manager.ReturnAllVolunteerShiftsForAVolunteer(1);

            Assert.AreEqual(true, shifts.Count > 0);
        }
        public void TestVolunteerShiftManagerRemoveNonExistingShift()
        {
            //Arrange
            IVolunteerShiftManager manager = new VolunteerShiftManager(_fakeShiftAccessor);

            //Act
            int rows = manager.RemoveVolunteerShift(1000);

            //Assert
            Assert.AreEqual(0, rows);
        }
        public void TestVolunteerShiftManagerReturnAllVolunteerShifts()
        {
            IVolunteerShiftManager manager = new VolunteerShiftManager(_fakeShiftAccessor);

            manager.AddVolunteerShift(new VolunteerShiftVM()
            {
                VolunteerID        = 0,
                VolunteerShiftID   = 0,
                ShiftTitle         = "Pretty dope shift",
                IsSpecialEvent     = true,
                VolunteerShiftDate = DateTime.Now,
                ScheduleID         = 0,
                ShiftNotes         = "Some things to note",
                VolunteerTaskID    = 0,
                Recurrance         = "Weekly",
                ShiftDescription   = "Something descriptive",
                ShiftStartTime     = TimeSpan.Zero,
                ShiftEndTime       = TimeSpan.Zero
            });
            manager.AddVolunteerShift(new VolunteerShiftVM()
            {
                VolunteerID        = 0,
                VolunteerShiftID   = 0,
                ShiftTitle         = "Even cooler shift",
                IsSpecialEvent     = false,
                VolunteerShiftDate = DateTime.Now,
                ScheduleID         = 0,
                ShiftNotes         = "Some other things to note",
                VolunteerTaskID    = 0,
                Recurrance         = "Daily",
                ShiftDescription   = "Something more descriptive",
                ShiftStartTime     = TimeSpan.Zero,
                ShiftEndTime       = TimeSpan.Zero
            });

            int count = manager.ReturnAllVolunteerShifts().Count;

            Assert.AreEqual(true, count > 1);
        }