public void SetUp() { ChatGameManager = new ChatGameManager(); MessageTestDummy = new MessageTestDummy(); ChatGameManager.Request_BroadcastMessage += MessageTestDummy.AcceptMessage; }
public void TearDown() { ChatGameManager.Request_BroadcastMessage -= MessageTestDummy.AcceptMessage; ChatGameManager = null; MessageTestDummy = null; }
public void Host(SettingsContainer settings) { InitializeSettings(settings); var gameManager = new ChatGameManager(); var globalChatManager = new GlobalChatManager(); gameManager.Request_BroadcastMessage += globalChatManager.BroadcastMessage; globalChatManager.Event_MessageArrived += gameManager.MessageArrived; this.Event_ClientDisconnected += globalChatManager.Handle_Disconnection; PropertyBag.ChatGameManager = gameManager; PropertyBag.GlobalChatManager = globalChatManager; base.StartHost(); }