Пример #1
0
        public void testinit()
        {
            string strelecIme         = "Testboi";
            string strelecPriimek     = "TestPrimek";
            int    strelecLetoRojstva = 1999;

            ServiceReferenceSZ.Strelec strelec = new ServiceReferenceSZ.Strelec()
            {
                Ime         = strelecIme,
                Priimek     = strelecPriimek,
                LetoRojstva = strelecLetoRojstva
            };

            string klubNaziv           = "pohorje test";
            string klubNaslov          = "nek naslov";
            int    klubLetoUstanovitve = 2004;

            ServiceReferenceSZ.Klub klub = new ServiceReferenceSZ.Klub()
            {
                Naziv           = klubNaziv,
                Naslov          = klubNaslov,
                LetoUstanovitve = klubLetoUstanovitve
            };


            client.AddStrelec(strelec, out int sid);
            strelec.StrelecID = sid;
            client.AddKlub(klub, out int kid);
            klub.KlubID = kid;

            Strelec = strelec;
            Klub    = klub;
        }
Пример #2
0
 public void CleanUp()
 {
     if (klub != null)
     {
         client.DeleteKlub(klub.KlubID.ToString());
         klub = null;
     }
 }
Пример #3
0
        public void Init()
        {
            ServiceReferenceSZ.Klub klub1 = new ServiceReferenceSZ.Klub()
            {
                Naziv           = "testKlub",
                Naslov          = "testnaslov",
                LetoUstanovitve = 2004
            };

            klub = klub1;
        }
Пример #4
0
        public void OdstraniKlub()
        {
            client.AddKlub(klub, out int id);
            int prej = client.ReturnKlubi().Count();

            client.DeleteKlub(id.ToString());
            int potem = client.ReturnKlubi().Count();

            Assert.IsTrue(prej > potem);

            var asd = client.ReturnKlubi().SingleOrDefault(a => a.KlubID == id);

            Assert.IsNull(asd);

            klub = null;
        }