Example #1
0
        public void ManageNotification()
        {
            _Child = _Parent.CreateNode("Manage Notification");

            ManageNotification notiPage = new ManageNotification();

            try
            {
                Assert.IsTrue(true);
                _Child.Pass("Called Manage Notification Class and Create Object");
            }
            catch (AssertionException)
            {
                _Child.Fail("Failed to Called Manage Notification Class and Create Object");
                throw;
            }

            notiPage.manageNitification();
            try
            {
                Assert.IsTrue(true);
                _Child.Pass("Enable or Disable Notification");
            }
            catch (AssertionException)
            {
                _Child.Fail("Failed to Enable or Disable Notification");
                throw;
            }
        }
Example #2
0
        public async Task <IHttpActionResult> ManageNotification(ManageNotification manageNotification)
        {
            // To do - Move the following code to a single method & use it across the project
            IEnumerable <string> tokenValues;
            string tokenValue = "";

            if (Request.Headers.TryGetValues("AuthorizationToken", out tokenValues))
            {
                tokenValue = tokenValues.FirstOrDefault();
            }
            var payment = await loanService.PostManageNotificationForAsync(tokenValue, manageNotification);

            if (payment == null)
            {
                return(NotFound());
            }
            return(Ok(payment));
        }