コード例 #1
0
        public void TestSingletonHall()
        {
            HallInterface testHall1 = Hall.hallInstance();
            HallInterface testHall2 = Hall.hallInstance();

            Assert.AreSame(testHall1, testHall2);
        }
コード例 #2
0
        public void TestSetListSquare()
        {
            HallInterface          testHall1  = Hall.hallInstance();
            List <SquareInterface> SquareList = new List <SquareInterface>();

            testHall1.SquareList = SquareList;
            Assert.AreEqual(testHall1.SquareList, SquareList);
        }
コード例 #3
0
        public static HallInterface hallInstance()
        {
            if (HallInstance == null)
            {
                HallInstance = (HallInterface) new Hall();
            }

            return(HallInstance);
        }
コード例 #4
0
ファイル: Program.cs プロジェクト: Amaknes/SystemProgTeam1
        static void Main(string[] args)
        {
            afficher = new Affichage();

            HallInterface salle = Hall.hallInstance();

            MHotel = MaîtreHôtel.maîtreHôtelInstance();

            CutleryDesk.cutleryDeskInstance();
            OrderDesk.orderDeskInstance();


            string rep = Console.ReadLine();


            Thread threadClient = new Thread(() => ArriverClient(rep));

            new Pause().AddThread(threadClient);
            threadClient.Start();


            Thread threadAccueilMaitreHotel = new Thread(() => AccueilMaitreHotel());

            new Pause().AddThread(threadAccueilMaitreHotel);
            threadAccueilMaitreHotel.Start();

            while (true)
            {
                char key = Console.ReadKey().KeyChar;
                if (key.Equals('w'))
                {
                    new Pause().PauseThreads();
                }
                else if (key.Equals('x'))
                {
                    new Pause().Resume();
                }
            }
        }
コード例 #5
0
        public void TestGetListSquare()
        {
            HallInterface testHall1 = Hall.hallInstance();

            Assert.AreEqual(testHall1.SquareList.Count, 2);
        }