public IActionResult Messages()
        {
            var model = new MessagesModel();

            model.Allowed = _pushNotificationsService.GetAllowedReceivers();
            model.Denied  = _pushNotificationsService.GetDeniedReceivers();

            return(View(model));
        }
        public async Task <IActionResult> Messages()
        {
            var model = new MessagesModel
            {
                Allowed = await _pushNotificationsService.GetAllowedReceivers(),
                Denied  = await _pushNotificationsService.GetDeniedReceivers()
            };

            return(View(model));
        }
        public async Task CanGetAllowedAndDeniedReceivers()
        {
            ClearPushRegistrations();

            var receiver1 = new PushRegistration {
                Allowed = true
            };
            var receiver2 = new PushRegistration {
                Allowed = true
            };
            var receiver3 = new PushRegistration {
                Allowed = false
            };

            await _pushNotificationsService.InsertPushReceiver(receiver1);

            await _pushNotificationsService.InsertPushReceiver(receiver2);

            await _pushNotificationsService.InsertPushReceiver(receiver3);

            var allowed = await _pushNotificationsService.GetAllowedReceivers();

            var denied = await _pushNotificationsService.GetDeniedReceivers();

            Assert.AreEqual(2, allowed);
            Assert.AreEqual(1, denied);
        }