public void TestAddNewPatient()
        {
            DatabaseConnertor databaseConnertor = new DatabaseConnertor();
            string            resp = databaseConnertor.connect();

            Assert.AreEqual("Done", resp);

            addPatient addPatient = new addPatient();

            addPatient.P_firstName        = "Test";
            addPatient.P_lastName         = "Man";
            addPatient.P_age              = 30;
            addPatient.P_dob              = DateTime.Now;
            addPatient.P_contact          = 140055544;
            addPatient.P_emergencyContact = 184845656;
            addPatient.P_gender           = "Male";
            addPatient.P_address          = "Cheras";
            addPatient.P_bedNum           = 5;
            addPatient.P_floor            = "4";
            addPatient.P_admission        = DateTime.Now;

            addPatientHandler addPatientHandler = new addPatientHandler();
            int resp2 = addPatientHandler.addNewPatient(databaseConnertor.getconn(), addPatient);

            Assert.AreEqual(1, resp2);
        }
Exemple #2
0
        public void TestRegisterDeregister()
        {
            DatabaseConnertor databaseConnertor = new DatabaseConnertor();
            string            resp = databaseConnertor.connect();

            Assert.AreEqual("Done", resp);

            rederegister rederegister = new rederegister();

            rederegister.Ms_id           = 1;
            rederegister.Register_date   = DateTime.Now;
            rederegister.Register_time   = "14:00";
            rederegister.Deregister_date = DateTime.Now;
            rederegister.Deregister_time = "20:00";

            rederegisterHandler rederegisterHandler = new rederegisterHandler();
            int resp2 = rederegisterHandler.addReDeregister(databaseConnertor.getconn(), rederegister);

            Assert.AreEqual(1, resp2);
        }
        public void TestAddPatientMedical()
        {
            DatabaseConnertor databaseConnertor = new DatabaseConnertor();
            string            resp = databaseConnertor.connect();

            Assert.AreEqual("Done", resp);

            pmdetails pmdetails = new pmdetails();

            pmdetails.P_id          = 11;
            pmdetails.P_systolic    = 120;
            pmdetails.P_diastolic   = 80;
            pmdetails.P_breathing   = 20;
            pmdetails.P_pulse       = 60;
            pmdetails.P_temperater1 = 36;

            pmdetailsHandler pmdetailsHandler = new pmdetailsHandler();
            int resp2 = pmdetailsHandler.addNewDetails(databaseConnertor.getconn(), pmdetails);

            Assert.AreEqual(1, resp2);
        }
Exemple #4
0
        public void TestPatientRealTime()
        {
            DatabaseConnertor databaseConnertor = new DatabaseConnertor();
            string            resp = databaseConnertor.connect();

            Assert.AreEqual("Done", resp);

            realtimeclass realtimeclass = new realtimeclass();

            realtimeclass.P_id          = 1;
            realtimeclass.P_systolic    = 120;
            realtimeclass.P_diastolic   = 80;
            realtimeclass.P_breathing   = 20;
            realtimeclass.P_pulse       = 60;
            realtimeclass.P_temperature = 36;

            realtimeHandler realtimeHandler = new realtimeHandler();
            int             resp2           = realtimeHandler.addRealTime(databaseConnertor.getconn(), realtimeclass);

            Assert.AreEqual(1, resp2);
        }
Exemple #5
0
        public void TestAddMedicalStaff()
        {
            DatabaseConnertor databaseConnertor = new DatabaseConnertor();
            string            resp = databaseConnertor.connect();

            Assert.AreEqual("Done", resp);

            addMedicalstaffs addMedicalstaffs = new addMedicalstaffs();

            addMedicalstaffs.Ms_position  = "Consultant";
            addMedicalstaffs.Ms_firstName = "Test";
            addMedicalstaffs.Ms_lastName  = "Man";
            addMedicalstaffs.Ms_dob       = DateTime.Now;
            addMedicalstaffs.Ms_age       = 40;
            addMedicalstaffs.Ms_contact   = 171234567;
            addMedicalstaffs.Ms_email     = "*****@*****.**";
            addMedicalstaffs.Ms_loginid   = "testman";
            addMedicalstaffs.Ms_password  = "******";

            addMedicalstaffshandler addMedicalstaffshandler = new addMedicalstaffshandler();
            int resp2 = addMedicalstaffshandler.addNewMedicalStaff(databaseConnertor.getconn(), addMedicalstaffs);

            Assert.AreEqual(1, resp2);
        }
Exemple #6
0
        public void TestAddNurse()
        {
            DatabaseConnertor databaseConnertor = new DatabaseConnertor();
            string            resp = databaseConnertor.connect();

            Assert.AreEqual("Done", resp);

            addNurses addNurses = new addNurses();

            addNurses.S_position  = "Nurse";
            addNurses.S_firstName = "Test";
            addNurses.S_lastName  = "Man";
            addNurses.S_dob       = DateTime.Now;
            addNurses.S_age       = 40;
            addNurses.S_contact   = 171234567;
            addNurses.S_email     = "*****@*****.**";
            addNurses.S_loginid   = "testman";
            addNurses.S_password  = "******";

            addNursesHandler addNursesHandler = new addNursesHandler();
            int resp2 = addNursesHandler.addNewNurse(databaseConnertor.getconn(), addNurses);

            Assert.AreEqual(1, resp2);
        }