public void TestSingletonHall() { HallInterface testHall1 = Hall.hallInstance(); HallInterface testHall2 = Hall.hallInstance(); Assert.AreSame(testHall1, testHall2); }
public void TestSetListSquare() { HallInterface testHall1 = Hall.hallInstance(); List <SquareInterface> SquareList = new List <SquareInterface>(); testHall1.SquareList = SquareList; Assert.AreEqual(testHall1.SquareList, SquareList); }
public static HallInterface hallInstance() { if (HallInstance == null) { HallInstance = (HallInterface) new Hall(); } return(HallInstance); }
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(); } } }
public void TestGetListSquare() { HallInterface testHall1 = Hall.hallInstance(); Assert.AreEqual(testHall1.SquareList.Count, 2); }