Esempio n. 1
0
        public void GetPatientTest()
        {
            UpdateManagement    uM    = UpdateManagement.GetInstance();
            PatientenManagement pM    = PatientenManagement.GetInstance();
            Patient             dummy = new Patient("Bilbo", "Beutlin", "X123457788", new DateTime(1985, 01, 01), "Onkologie", "Onkologie", new DateTime(2019, 04, 01), "m");

            bool result = pM.PatientAnlegen(dummy, ZimmerManagement.GetInstance().suchePassendesBett(dummy));

            Patient dummy2 = uM.GetPatient("X123456788");

            pM.PatientLoeschen("X123457788");
            Assert.IsTrue(dummy.Equals(dummy2));
        }
Esempio n. 2
0
        public void GetCurrentBettenbelegungTest()
        {
            UpdateManagement    upM             = UpdateManagement.GetInstance();
            PatientenManagement pM              = PatientenManagement.GetInstance();
            Bettenbelegung      bettenbelegung1 = upM.GetCurrentBettenbelegung();
            Patient             dummy           = new Patient("Max", "Mustermann", "F111222333", new DateTime(1985, 01, 01), "Onkologie", "Onkologie", new DateTime(2019, 04, 01), "m");
            Patient             dummy2          = new Patient("Sven", "Knabe", "G456789012", new DateTime(2010, 02, 02), "Pädiatrie", "Pädiatrie", new DateTime(2019, 05, 01), "m");
            Patient             dummy3          = new Patient("Christina", "Meier", "H899001233", new DateTime(1997, 04, 05), "Onkologie", "Onkologie", new DateTime(2019, 09, 01), "w");


            pM.PatientAnlegen(dummy, ZimmerManagement.GetInstance().suchePassendesBett(dummy));
            pM.PatientAnlegen(dummy2, ZimmerManagement.GetInstance().suchePassendesBett(dummy2));
            pM.PatientAnlegen(dummy3, ZimmerManagement.GetInstance().suchePassendesBett(dummy3));

            Bettenbelegung bettenbelegung2 = upM.GetCurrentBettenbelegung();

            Assert.IsTrue(bettenbelegung1.Gesamt() + 3 == bettenbelegung2.Gesamt());
        }
Esempio n. 3
0
        public void GetCurrentVerlegungslisteTest()
        {
            UpdateManagement    upM    = UpdateManagement.GetInstance();
            ZimmerManagement    zM     = ZimmerManagement.GetInstance();
            PatientenManagement pM     = PatientenManagement.GetInstance();
            Patient             dummy  = new Patient("Max", "Mustermann", "I123654789", new DateTime(1985, 01, 01), "Onkologie", "Onkologie", new DateTime(2019, 04, 01), "m");
            Patient             dummy2 = new Patient("Sven", "Knabe", "J987456123", new DateTime(2010, 02, 02), "Pädiatrie", "Pädiatrie", new DateTime(2019, 05, 01), "m");
            Patient             dummy3 = new Patient("Christina", "Meier", "K899112445", new DateTime(1997, 04, 05), "Onkologie", "Onkologie", new DateTime(2019, 09, 01), "w");

            pM.PatientAnlegen(dummy, ZimmerManagement.GetInstance().suchePassendesBett(dummy));
            pM.PatientAnlegen(dummy2, ZimmerManagement.GetInstance().suchePassendesBett(dummy2));
            pM.PatientAnlegen(dummy3, ZimmerManagement.GetInstance().suchePassendesBett(dummy3));

            Verlegungsliste verlegungsliste = upM.GetCurrentVerlegungsliste();

            bool max       = false;
            bool sven      = false;
            bool christina = false;

            foreach (var titem in verlegungsliste.Transferliste)
            {
                if (titem.Person.Nachname.Equals("Mustermann"))
                {
                    max = true;
                }
                else if (titem.Person.Nachname.Equals("Knabe"))
                {
                    sven = true;
                }
                else if (titem.Person.Nachname.Equals("Meier"))
                {
                    christina = true;
                }
            }

            Assert.IsTrue(max && sven && christina);

            pM.PatientLoeschen("I123654789");
            pM.PatientLoeschen("J987456123");
            pM.PatientLoeschen("K899112445");
        }