Ejemplo n.º 1
0
 public void CreateNewMyTuple_BadKey(string str, string queueF)
 {
     mtf = new MyTupleFactory();
     mt  = new MyTuple <string, Queue>("String", new Queue());
     qf  = new QueueFactory();
     Assert.Throws <ArgumentException>(() => {
         QueueFactory qf = getObject1(queueF);
     });
 }
Ejemplo n.º 2
0
 public void setup()
 {
     konzola  = new Konzola1();
     konzola2 = new Konzola2();
     lista    = new List <Item>();
     pfu      = new Pomocne_funkcijeUpdate();
     mtf      = new MyTupleFactory();
     qf       = new QueueFactory();
     dict     = new Dictionary <string, MyTuple <MyTuple <string, Queue>, MyTuple <string, Queue> > >();
 }
Ejemplo n.º 3
0
        public void CreateNewMyTuple_True(string str, string queueF)
        {
            mtf = new MyTupleFactory();
            mt  = new MyTuple <string, Queue>("String", new Queue());
            QueueFactory            qf = getObject1(queueF);
            MyTuple <string, Queue> sd = mtf.CreateNewMyTuple(str, qf);

            Assert.AreEqual(sd.Item1, mt.Item1);
            Assert.AreEqual(mt.Item2, sd.Item2);
        }
Ejemplo n.º 4
0
 public void TestSetup()
 {
     cf             = new ClientFactory();
     server         = new Serverr(cf, null);
     konzola        = new Konzola();
     m              = new Metode(server, konzola);
     mytuplefactory = new MyTupleFactory();
     queueFactory   = new QueueFactory();
     pfs            = new Pomocne_funkcijeSubscribe(mytuplefactory, queueFactory);
 }
Ejemplo n.º 5
0
 public void setup()
 {
     mtf  = new MyTupleFactory();
     qf   = new QueueFactory();
     pfc  = new Pomocne_funkcijeCreate(mtf, qf);
     pfs  = new Pomocne_funkcijeSubscribe(mtf, qf);
     pfu  = new Pomocne_funkcijeUpdate();
     meni = new Meni(pfc, pfs, pfu);
     cf   = new ClientFactory();
     srv  = new Serverr(cf, null);
 }
Ejemplo n.º 6
0
 public void TearDown()
 {
     cf             = null;
     server         = null;
     konzola        = null;
     m              = null;
     mytuplefactory = null;
     queueFactory   = null;
     pfc            = null;
     client         = null;
 }
Ejemplo n.º 7
0
 public void TestSetup()
 {
     cf             = new ClientFactory();
     server         = new Serverr(cf, null);
     konzola        = new Konzola();
     m              = new Metode(server, konzola);
     mytuplefactory = new MyTupleFactory();
     queueFactory   = new QueueFactory();
     pfc            = new Pomocne_funkcijeCreate(mytuplefactory, queueFactory);
     client         = new Clientt("Klijent");
 }
Ejemplo n.º 8
0
        public void CreateNewMyTuple_(string queueF1, string queueF2, string str1, string str2)
        {
            mtf = new MyTupleFactory();
            MyTuple <string, Queue> mt1 = new MyTuple <string, Queue>("String1", new Queue());
            MyTuple <string, Queue> mt2 = new MyTuple <string, Queue>("String2", new Queue());
            MyTuple <MyTuple <string, Queue>, MyTuple <string, Queue> > sd = mtf.CreateNewMyTuple1(getObject2(queueF1, str1), getObject3(queueF2, str2));

            Assert.AreEqual(sd.Item1.Item1, mt1.Item1);
            Assert.AreEqual(sd.Item1.Item2, mt1.Item2);
            Assert.AreEqual(sd.Item2.Item1, mt2.Item1);
            Assert.AreEqual(sd.Item2.Item2, mt2.Item2);
        }
Ejemplo n.º 9
0
        static void Main(string[] args)
        {
            Repository repo = new Repository("myConnectionString");

            repo.Database.CreateIfNotExists();
            ConsoleWrapper            cw  = new ConsoleWrapper();
            QueueFactory              qf  = new QueueFactory();
            MyTupleFactory            mtf = new MyTupleFactory();
            ClientFactory             cf  = new ClientFactory();
            Pomocne_funkcijeSubscribe pfs = new Pomocne_funkcijeSubscribe(mtf, qf);
            Pomocne_funkcijeCreate    pfc = new Pomocne_funkcijeCreate(mtf, qf);

            Pomocne_funkcijeUpdate.Pomocne_funkcijeUpdate pfu = new Pomocne_funkcijeUpdate.Pomocne_funkcijeUpdate();
            Serverr server = new Serverr(cf, repo);
            Metode  metode = new Metode(server, cw);
            Meni    meni   = new Meni(pfc, pfs, pfu);
            Model   m      = new Model();
            Clientt c      = new Clientt();


            server.IscitajIzBazeNaPocetku();

            meni.Menu(cw, metode);
        }
Ejemplo n.º 10
0
 public void setup()
 {
     pfs = new Pomocne_funkcijeSubscribe(mtf, qf);
     mtf = new MyTupleFactory();
     qf  = new QueueFactory();
 }
Ejemplo n.º 11
0
 public void setup()
 {
     mtf  = new MyTupleFactory();
     qf   = new QueueFactory();
     dict = new Dictionary <string, MyTuple <MyTuple <string, Queue>, MyTuple <string, Queue> > >();
 }