Exemplo n.º 1
0
        // GET: Sales
        public ActionResult Index()
        {
            var notifications = new Models.NotificationModel();

            ViewBag.zeroA  = notifications.zeroAmount;
            ViewBag.smallA = notifications.smallAmount;
            var sales = from s in db.Sales
                        select s;

            return(View(sales.AsEnumerable()));
        }
Exemplo n.º 2
0
        public async void NotificationService_CreateNotification_ShouldCreateNotificationForUser()
        {
            // Arrange
            _mockNotificationRepository.Setup(_ => _.AddAsync(It.IsAny <Models.Entities.Notification>()))
            .ReturnsAsync(new Models.Entities.Notification {
                Id = 1
            });

            _mockPushService.Setup(_ => _.PushNotification(It.IsAny <Models.NotificationModel>()));

            // Act
            var notification = new Models.NotificationModel();
            var result       = await _notificationService.CreateNotification(notification);

            // Assert
            result.Id.Should().Be(1);
        }