예제 #1
0
        public void Given_Valid_Argument_When_Temperature_Invoke_Then_Valid_Result_Asserted()
        {
            AlertingSystemControllerLib.AlertingController m_validate = new AlertingSystemControllerLib.AlertingController();
            string m_actualValue = m_validate.ValidateTemperature("Patient_123", "10");
            string m_expected    = "Alert!!! Temperature not in range Temperature: 10 for patient Patient_123";

            Assert.AreEqual(m_actualValue, m_expected);
        }
예제 #2
0
        public void Given_Valid_Argument_When_ValidateSpo2_Invoke_Then_Valid_Result_Asserted()
        {
            AlertingSystemControllerLib.AlertingController m_validate = new AlertingSystemControllerLib.AlertingController();
            string m_actualValue   = m_validate.ValidateSpo2("Patient_123", "10");
            string m_expectedValue = "Alert!!! SPO2 not in range SPO2: 10 for patient: Patient_123";

            Assert.AreEqual(m_actualValue, m_expectedValue);
        }
예제 #3
0
        public void Given_Valid_Json_string_ValidatePatientVitalSigns_Invoke_Then_Validate_Result_Asserted()
        {
            AlertingSystemControllerLib.AlertingController m_validate = new AlertingSystemControllerLib.AlertingController();
            string alertMessage;
            bool   m_actual = m_validate.ValidatePatientVitalSigns("587", "{ patientId: 1, SPO2: 98, Temperature: 100, PulseRate: 101}", out alertMessage);

            Assert.AreEqual(false, m_actual);
            //{ patientId: 1, SPO2: 98, Temperature: 100, PulseRate: 101}
        }
예제 #4
0
        public void Given_PatientId_When_ReadPatientVitalSigns_Invoke_Then_Valid_Result_Asserted()
        {
            PatientVitalSignWriter m_writer = new PatientVitalSignWriter();
            string m_expectedValue          = "{patient id: Patient_123, SPO2: 99, Temp: 98, PulseRate: 94}";

            m_writer.StorePatientVitalSigns("Patient_123", m_expectedValue);

            AlertingSystemControllerLib.AlertingController m_alertControl = new AlertingSystemControllerLib.AlertingController();
            string m_actualValue = m_alertControl.ReadPatientVitalSigns("Patient_123");

            Assert.AreEqual(m_actualValue, m_expectedValue);
        }