示例#1
0
        public void TestDrugiIzuzetak()
        {
            Student       student       = new Student("hrvo", "hrvic123", new LicniPodaci(), null, new Skolovanje());
            Student       student1      = new Student("sadik", "sadik123", new LicniPodaci(), null, new Skolovanje());
            Student       student2      = new Student("sanjin", "sanjin123", new LicniPodaci(), null, new Skolovanje());
            StudentskiDom studentskiDom = new StudentskiDom(1);

            studentskiDom.UpisUDom(student, 2, true);
            studentskiDom.UpisUDom(student1, 2, true);
            studentskiDom.UpisUDom(student2, 2, true);
        }
示例#2
0
            ///Amer Beso - 68-ST - implementacija
            public void TestStudentskiDomKlasaUpisiMeUDom()
            {
                List <String> l = new List <string>();

                l.Add("Boracka br.1");
                Skolovanje    s  = new Skolovanje();
                LicniPodaci   l1 = new LicniPodaci("Faris", "Colakovic", "Zenica", "*****@*****.**", "image.jpeg", "1231231231233", Spol.Muško, DateTime.Now);
                Student       k1 = new Student("faris12", "colakovic23", l1, l, s);
                Student       k2 = new Student("amer12", "beso12223", l1, l, s);
                StudentskiDom sd = new StudentskiDom(1);

                sd.UpisUDom(k1, 2, false);
                sd.UpisUDom(k2, 1, true);
                Assert.IsTrue(sd.Sobe[0].Stanari.Contains(k1));
            }
示例#3
0
        public void TestMethod2()
        {
            Student       student       = new Student("hrvo", "hrvic123", new LicniPodaci(), null, new Skolovanje());
            Student       student1      = new Student("sadik", "sadik123", new LicniPodaci(), null, new Skolovanje());
            Student       student2      = new Student("sanjin", "sanjin123", new LicniPodaci(), null, new Skolovanje());
            StudentskiDom studentskiDom = new StudentskiDom(0);

            for (int i = 0; i < 2; i++)
            {
                studentskiDom.Sobe.Add(new Soba(i, 20));
            }
            studentskiDom.UpisUDom(student, 2, true);
            studentskiDom.UpisUDom(student1, 2, true);
            studentskiDom.UpisUDom(student2, 2, true);
            Assert.AreEqual(3, studentskiDom.Sobe[0].Stanari.Count);
        }
示例#4
0
            ///Amer Beso - 68-ST - implementacija
            public void TestStudentskiDomKlasaUpisiMeUDomException2()
            {
                List <String> l = new List <string>();

                l.Add("Boracka br.1");
                Skolovanje    s  = new Skolovanje();
                LicniPodaci   l1 = new LicniPodaci("Faris", "Colakovic", "Zenica", "*****@*****.**", "image.jpeg", "1231231231233", Spol.Muško, DateTime.Now);
                Student       k1 = new Student("faris12", "colakovic23", l1, l, s);
                Student       k2 = new Student("amer12", "beso12223", l1, l, s);
                Student       k3 = new Student("kerim12", "hodizc12223", l1, l, s);
                StudentskiDom sd = new StudentskiDom(1);

                sd.UpisUDom(k1, 2, true);
                sd.UpisUDom(k2, 2, true);
                sd.UpisUDom(k3, 2, false);  //96. linija u klasi StudentskiDom.cs
            }
示例#5
0
        public void TestPrviIzuzetak()
        {
            Student       student       = new Student("hrvo", "hrvic123", new LicniPodaci(), null, new Skolovanje());
            StudentskiDom studentskiDom = new StudentskiDom(100);

            for (int i = 0; i < 10; i++)
            {
                studentskiDom.Sobe.Add(new Soba(i + 5, 20));
            }
            studentskiDom.UpisUDom(student, 50, false);
        }
示例#6
0
        public void TestMethod1()
        {
            Student       student       = new Student("hrvo", "hrvic123", new LicniPodaci(), null, new Skolovanje());
            StudentskiDom studentskiDom = new StudentskiDom(100);

            for (int i = 0; i < 10; i++)
            {
                studentskiDom.Sobe.Add(new Soba(i, 20));
            }
            studentskiDom.UpisUDom(student, 20, false);
            Assert.AreEqual(true, studentskiDom.Sobe[100].DaLiJeStanar(student));
        }
示例#7
0
            ///Amer Beso - 68-ST - implementacija
            public void TestStudentskiDomKlasaRadSaStudentom2()
            {
                List <String> l = new List <string>();

                l.Add("Boracka br.1");
                Skolovanje    s  = new Skolovanje();
                LicniPodaci   l1 = new LicniPodaci("Faris", "Colakovic", "Zenica", "*****@*****.**", "image.jpeg", "1231231231233", Spol.Muško, DateTime.Now);
                Student       k1 = new Student("faris12", "colakovic23", l1, l, s);
                StudentskiDom sd = new StudentskiDom(1);

                sd.UpisUDom(k1, 2, true);
                sd.RadSaStudentom(k1, 1);
                Assert.IsFalse(sd.Studenti.Contains(k1));
            }