Beispiel #1
0
        public void PassBaggageTest()
        {
            DropOff  dropOff   = new DropOff(5, "Drop1");
            CheckIn  checkIn   = new CheckIn(dropOff, "CheckIn", 1);
            Conveyor conveyor1 = new Conveyor(dropOff, "Conveyor1");

            conveyor1.IsBroken = false;
            Conveyor conveyor2 = new Conveyor(dropOff, "Conveyor2");

            conveyor2.IsBroken = false;

            MainProcessArea mpa = new MainProcessArea("mpa");

            LinkedList     linkedList   = new LinkedList();
            CreateLinkList linkedLinked = new CreateLinkList(linkedList, checkIn, conveyor1, conveyor2, dropOff);
            Passenger      passenger    = new Passenger("TTT", dropOff);
            Baggage        baggage      = new Baggage(dropOff, 5, passenger);

            linkedList.PassBaggage(baggage);

            //Assert.AreEqual(1, checkIn.baggage.Count);
            //Assert.AreEqual(1, conveyor1.baggage.Count);

            //Assert.AreEqual(1, mpa.baggage.Count);
            //Assert.AreEqual(1, conveyor2.baggage.Count);
            Assert.AreEqual(1, dropOff.baggage.Count);
        }
Beispiel #2
0
        public void TestMethod1()
        {
            DropOff         dropOff      = new DropOff(5, "Drop1");
            CheckIn         checkIn      = new CheckIn(dropOff, "CheckIn", 1);
            Conveyor        conveyor1    = new Conveyor(dropOff, "Conveyor1");
            Conveyor        conveyor2    = new Conveyor(dropOff, "Conveyor2");
            MainProcessArea mpa          = new MainProcessArea("mpa");
            LinkedList      linkedList   = new LinkedList();
            CreateLinkList  linkedLinked = new CreateLinkList(linkedList, checkIn, conveyor1, conveyor2, dropOff);

            Assert.IsNotNull(linkedLinked);
        }
Beispiel #3
0
        public void GetLastTest()
        {
            DropOff         dropOff      = new DropOff(5, "Drop1");
            CheckIn         checkIn      = new CheckIn(dropOff, "CheckIn", 1);
            Conveyor        conveyor1    = new Conveyor(dropOff, "Conveyor1");
            Conveyor        conveyor2    = new Conveyor(dropOff, "Conveyor2");
            MainProcessArea mpa          = new MainProcessArea("mpa");
            LinkedList      linkedList   = new LinkedList();
            CreateLinkList  linkedLinked = new CreateLinkList(linkedList, checkIn, conveyor1, conveyor2, dropOff);

            linkedList.GetLast();
            Assert.AreEqual(dropOff, linkedList.GetLast());
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            DropOff         drop       = new DropOff(5, "drop1");
            CheckIn         check      = new CheckIn(drop, "check1", 4);
            CheckIn         check2     = new CheckIn(drop, "check2", 5);
            Conveyor        conveyorl  = new Conveyor(drop, "convl");
            Conveyor        conveyorl1 = new Conveyor(drop, "convl1");
            Conveyor        conveyorb2 = new Conveyor(drop, "convb");
            Conveyor        conveyorb3 = new Conveyor(drop, "convb1");
            MainProcessArea mpa        = new MainProcessArea("mpa1");

            LinkedList l = new LinkedList();
            LinkedList b = new LinkedList();

            l.AddLast(check);
            l.AddLast(conveyorl);
            //l.AddLast(mpa);
            l.AddLast(conveyorl1);
            l.AddLast(drop);

            b.AddLast(check2);
            b.AddLast(conveyorb2);
            //b.AddLast(mpa);
            b.AddLast(conveyorb3);
            b.AddLast(drop);

            Airport airport = new Airport();



            Baggage x  = new Baggage(drop, 5, new Passenger("bag1", drop));
            Baggage xy = new Baggage(drop, 6, new Passenger("bag2", drop));

            l.PassBaggage(x);
            b.PassBaggage(xy);
            //Console.WriteLine(l.first.Name);
            //Console.WriteLine(l.first.Name);

            //l.printAllNodes();

            Console.ReadKey();
        }