public void EmailTester()
        {
            var alerterObj = new EmailAlertService();
            var email      = new VitalAlertEmailFormat("Ambani", "100", "ICU01", 01, "WARNING");
            var response   = alerterObj.SendEmailVitalAlert(email);

            Assert.Equal(HttpStatusCode.OK, response);
        }
        public void EmailAlertControllerTest()
        {
            var alterter         = new EmailAlertService();
            var aleterController = new AlertServiceController(alterter);
            var email            = new VitalAlertEmailFormat("Test", "100", "ICU01", 01, "EMERGENCY");
            var response         = aleterController.SendEmailAlert(email);

            Assert.Equal(HttpStatusCode.OK, response);
        }
예제 #3
0
 // ReSharper disable once UnusedMember.Global
 public void SendEmailAlert(VitalAlertEmailFormat email)
 {
     _request = new RestRequest("AlertService/SendEmailAlert", Method.POST)
     {
         RequestFormat = DataFormat.Json
     };
     _request.AddJsonBody(email);
     _client.Execute(_request);
 }
        public void WhenQueryServerToSendEmailAlertAssertNoException()
        {
            var email = new VitalAlertEmailFormat("TestPatient", "100", "ICU01", 1, "WARNING");

            _request = new RestRequest("AlertService/SendEmailAlert", Method.POST)
            {
                RequestFormat = DataFormat.Json
            };
            _request.AddJsonBody(email);
            var response = _client.Execute(_request);

            Assert.Equal(HttpStatusCode.OK, response.StatusCode);
        }
 public object SendEmailAlert(VitalAlertEmailFormat email)
 {
     return(email != null?_alerter.SendEmailVitalAlert(email) : HttpStatusCode.BadRequest);
 }