public void AddCalendar_AddingCalendarForInvalidUser_ShouldFail(int calendarUserId, int actualUserId)
        {
            // Arrange
            var calendarViewModel = new CalendarViewModel
            {
                UserId = calendarUserId
            };

            var mockCalendarRepo = new Mock <ICalendarRepository>();
            var calendarDomain   = new CalendarDomain(mockCalendarRepo.Object, null, null, null);

            // Act
            Assert.Throws <ForbiddenException>(() => calendarDomain.AddCalendar(calendarViewModel, actualUserId));

            // Assert
            mockCalendarRepo.Verify(cr => cr.AddCalendar(It.IsAny <Calendar>()), Times.Never());
        }
        public void AddCalendar_AddingCalendar_ShouldReturnCalendarId(int userId, int calendarId)
        {
            // Arrange
            var calendarViewModel = new CalendarViewModel
            {
                UserId = userId
            };

            var mockCalendarRepo = new Mock <ICalendarRepository>();

            mockCalendarRepo
            .Setup(x => x.AddCalendar(It.IsAny <Calendar>()))
            .Returns(() => calendarId);

            var calendarDomain = new CalendarDomain(mockCalendarRepo.Object, _mapper, null, null);

            // Act
            var actualCalendarId = calendarDomain.AddCalendar(calendarViewModel, userId);

            // Assert
            Assert.Equal(calendarId, actualCalendarId);
            mockCalendarRepo.Verify(cr => cr.AddCalendar(It.IsNotNull <Calendar>()), Times.Once());
        }