Exemplo n.º 1
0
        public void AddDoctorExceptionUsernameTest()
        {
            DoctorRepository_Accessor target = new DoctorRepository_Accessor();
            int    ID       = 3102;
            string name     = "Mirako Vali";
            string address  = "Kopernikova 4";
            string username = null;
            int    password = 2132;

            target.AddDoctor(ID, name, address, username, password);
        }
Exemplo n.º 2
0
        public void AddDoctorExceptionPasswordTest()
        {
            DoctorRepository_Accessor target = new DoctorRepository_Accessor();
            int    ID       = 3102;
            string name     = "Mirako Maric";
            string address  = "Kopernikova 4";
            string username = "******";
            int    password = 0;

            target.AddDoctor(ID, name, address, username, password);
        }
Exemplo n.º 3
0
        public void RemoveDoctorTest()
        {
            DoctorRepository_Accessor target = new DoctorRepository_Accessor();
            int    ID       = 4520;
            string name     = "Mirko Katić";
            string address  = "Kopernikova 4";
            string username = "******";
            int    password = 2132;

            target.AddDoctor(ID, name, address, username, password);
            target.RemoveDoctor(ID, name);
            Assert.AreEqual(0, target._listDoctors.Count);
        }
Exemplo n.º 4
0
        public void AddDoctorTest()
        {
            DoctorRepository_Accessor target = new DoctorRepository_Accessor();
            int    ID       = 4520;
            string name     = "Mirko Katić";
            string address  = "Kopernikova 4";
            string username = "******";
            int    password = 5135;

            target.AddDoctor(ID, name, address, username, password);
            Assert.AreEqual(ID, target._listDoctors[0].ID);
            Assert.AreEqual(name, target._listDoctors[0].Name);
            Assert.AreEqual(address, target._listDoctors[0].Address);
            Assert.AreEqual(username, target._listDoctors[0].Username);
            Assert.AreEqual(password, target._listDoctors[0].Password);
        }
Exemplo n.º 5
0
        public void GetDoctorByIDTest()
        {
            DoctorRepository_Accessor target = new DoctorRepository_Accessor();
            int    ID       = 4520;
            string name     = "Mirko Katić";
            string address  = "Kopernikova 4";
            string username = "******";
            int    password = 2132;
            Doctor expected = new Doctor(ID, name, address, username, password);

            target._listDoctors.Add(expected);
            Doctor actual;

            actual = target.GetDoctorByID(ID);
            Assert.AreEqual(expected, actual);
        }