public void Test_GetAlertProfile_Service_NotFound()
        {
            var alertInput = new AlertInputParm {
            };

            var httpStatusCode = HttpStatusCode.NotFound;

            var localParser     = new RestParserSvc(restUri + @"invalidurl/", "CLIENT_SECRET", "CLIENT_ID", "PATHOSPCODE");
            var actualException = Assert.ThrowsException <AMException>(() => localParser.GetAlertProfile(alertInput));

            Assert.AreEqual(actualException.HttpStatusCode, httpStatusCode);
        }
        public void Test_GetAlertProfile_Service_Unavailable()
        {
            var alertInput = new AlertInputParm {
            };

            var httpStatusCode = HttpStatusCode.ServiceUnavailable;

            var localParser     = new RestParserSvc("http://localhost:3181/pms-asa/invalidurl/", "CLIENT_SECRET", "CLIENT_ID", "PATHOSPCODE");
            var actualException = Assert.ThrowsException <AMException>(() => localParser.GetAlertProfile(alertInput));

            Assert.AreEqual(actualException.HttpStatusCode, httpStatusCode);
        }
        public void Test_GetAlertProfile_Invalid_Client_Secret()
        {
            var alertInput = new AlertInputParm {
                PatientInfo = new PatientInfo {
                    Hkid = "INVALID_CLIENT_SECRET"
                }
            };
            var errorMessage   = "Unauthorized";
            var httpStatusCode = HttpStatusCode.Unauthorized;

            var localParser = new RestParserSvc(restUri, "INVALID_CLIENT_SECRET", "CLIENT_ID", "PATHOSPCODE");

            var actualException = Assert.ThrowsException <AMException>(() => localParser.GetAlertProfile(alertInput));

            Assert.AreEqual(actualException.HttpStatusCode, httpStatusCode);
            Assert.AreEqual(actualException.Message, errorMessage);
        }