public void GetNumOfWebNotifications_NotificationsInDb_Enumeration()
        {
            mockUnitOfWork.Setup(m => m.Notifications.Get(It.IsAny <Expression <Func <Notification, bool> > >()
                                                          , It.IsAny <Func <IQueryable <Notification>,
                                                                            IOrderedQueryable <Notification> > >(), It.IsAny <string>()))
            .Returns(new List <Notification> {
                new Notification {
                    Time = DateTime.Now, Type = NotificationType.Web
                }
            });

            var result = handler.GetNumOfWebNotifications("Herecore");

            Assert.That(result == 1);
        }
        public void GetNumOfWebNotifications_NotificationsInDb_Enumeration()
        {
            mockUnitOfWork.Setup(m => m.EmailCampaignNotifications.Get(It.IsAny <Expression <Func <EmailCampaignNotification, bool> > >()
                                                                       , It.IsAny <Func <IQueryable <EmailCampaignNotification>,
                                                                                         IOrderedQueryable <EmailCampaignNotification> > >(), It.IsAny <string>()))
            .Returns(new List <EmailCampaignNotification> {
                new EmailCampaignNotification {
                    Type = NotificationType.Web
                }
            });

            mockBaseHandler.Setup(m => m.GetNumOfWebNotifications(It.IsAny <string>())).Returns(0);

            var result = handler.GetNumOfWebNotifications("Herecore");

            Assert.That(result == 1);
        }
        public void GetNumOfWebNotifications_NotificationsInDb_Enumeration()
        {
            mockUnitOfWork.Setup(m => m.CampaignNotifications.Get(It
                                                                  .IsAny <Expression <Func <CampaignNotification, bool> > >()
                                                                  , It.IsAny <Func <IQueryable <CampaignNotification>,
                                                                                    IOrderedQueryable <CampaignNotification> > >(), It.IsAny <string>()))
            .Returns(new List <CampaignNotification>
            {
                new CampaignNotification {
                    Type       = NotificationType.Web, Event = CampaignNotificationEvent.Sending
                    , Campaign = new Company {
                        SendingTime = DateTime.Now
                    }
                }
            });

            mockBaseHandler.Setup(m => m.GetNumOfWebNotifications(It.IsAny <string>())).Returns(0);

            var result = handler.GetNumOfWebNotifications("Herecore");

            Assert.That(result, Is.EqualTo(1));
        }
 public int GetNumberOfWebNotifications(string userId)
 {
     return(handler.GetNumOfWebNotifications(userId));
 }