예제 #1
0
        public ChefMaster()
        {
            //Instanciation personnelle

            MH = MaitreHotel.GetInstance("Maitre", "Hotel");
            CS = CommisSalle.GetInstance("Commis", "Salle");

            CR_1 = new ChefRang("CR", "1");
            CR_2 = new ChefRang("CR", "2");
            CR_3 = new ChefRang("CR", "3");
            CR_4 = new ChefRang("CR", "4");

            SR_1 = new Serveur("SR", "1");
            SR_2 = new Serveur("SR", "2");
            SR_3 = new Serveur("SR", "3");
            SR_4 = new Serveur("SR", "4");

            //Instanciation Salle

            TB_Rang1    = new Table[4];
            TB_Rang1[0] = Table_4_Rang1_1 = new Table(4, 0, 1);
            TB_Rang1[1] = Table_4_Rang1_2 = new Table(4, 0, 2);
            TB_Rang1[2] = Table_4_Rang1_3 = new Table(4, 0, 3);
            TB_Rang1[3] = Table_4_Rang1_4 = new Table(4, 0, 4);
            Rang1       = new Rang(SR_1, CR_1, TB_Rang1);

            TB_Rang2    = new Table[4];
            TB_Rang2[0] = Table_4_Rang_2_1 = new Table(4, 0, 5);
            TB_Rang2[1] = Table_4_Rang_2_2 = new Table(4, 0, 6);
            TB_Rang2[2] = Table_4_Rang_2_3 = new Table(4, 0, 7);
            TB_Rang2[3] = Table_4_Rang_2_4 = new Table(4, 0, 8);
            Rang2       = new Rang(SR_2, CR_2, TB_Rang2);

            Carre1 = new Carre(Rang1, Rang2);

            TB_Rang3    = new Table[3];
            TB_Rang3[0] = Table_8_Rang3_1 = new Table(8, 0, 9);
            TB_Rang3[1] = Table_4_Rang3_2 = new Table(4, 0, 10);
            TB_Rang3[2] = Table_8_Rang3_3 = new Table(8, 0, 11);
            Rang3       = new Rang(SR_3, CR_3, TB_Rang3);

            TB_Rang4    = new Table[3];
            TB_Rang4[0] = Table_4_Rang_4_1 = new Table(4, 0, 12);
            TB_Rang4[1] = Table_8_Rang_4_2 = new Table(8, 0, 13);
            TB_Rang4[2] = Table_4_Rang_4_3 = new Table(4, 0, 14);
            Rang4       = new Rang(SR_3, CR_3, TB_Rang3);

            Carre2 = new Carre(Rang3, Rang4);

            Presentoire = new PresentoireSalle();
            Salle       = Salle.GetInstance(Carre1, Carre2, MH, CS, Presentoire);

            Chiffre = 0;



            InitializeComponent();
        }
 public void Test_GetInstance()
 {
     //Assert
     Assert.AreEqual(CommisSalle.GetInstance("", ""), CommisSalle.GetInstance());
 }