public void CloseOnCloseButtonPressed() { controller.SetVisibility(true); Assert.AreEqual(true, controller.view.gameObject.activeSelf); controller.view.minimizeButton.onClick.Invoke(); Assert.AreEqual(false, controller.view.gameObject.activeSelf); }
public void CloseOnCloseButtonPressed() { IChatController chatController = Substitute.For <IChatController>(); chatController.GetEntries().ReturnsForAnyArgs(new List <ChatMessage>()); InitializeChatWindowController(chatController); controller.SetVisibility(true); Assert.AreEqual(true, controller.view.gameObject.activeSelf); controller.view.minimizeButton.onClick.Invoke(); Assert.AreEqual(false, controller.view.gameObject.activeSelf); }
protected override IEnumerator SetUp() { yield return(base.SetUp()); UserProfileController.i.ClearProfilesCatalog(); var ownProfile = UserProfile.GetOwnUserProfile(); ownProfileModel = new UserProfileModel(); ownProfileModel.userId = "my-user-id"; ownProfileModel.name = "NO_USER"; ownProfile.UpdateData(ownProfileModel, false); testProfileModel = new UserProfileModel(); testProfileModel.userId = "my-user-id-2"; testProfileModel.name = "TEST_USER"; UserProfileController.i.AddUserProfileToCatalog(testProfileModel); //NOTE(Brian): This profile is added by the LoadProfile message in the normal flow. // Adding this here because its used by the chat flow in ChatMessageToChatEntry. UserProfileController.i.AddUserProfileToCatalog(ownProfileModel); controller = new PrivateChatWindowHUDController(); chatController = new ChatController_Mock(); controller.Initialize(chatController); controller.Configure(testProfileModel.userId); controller.SetVisibility(true); this.view = controller.view; Assert.IsTrue(view != null, "World chat hud view is null?"); Assert.IsTrue(controller != null, "World chat hud controller is null?"); yield break; }
private void InitializeChatWindowController(IChatController chatController) { controller = new PrivateChatWindowHUDController(); controller.Initialize(chatController); controller.Configure(testProfileModel.userId); controller.SetVisibility(true); view = controller.view; }
public void OnMinimizeButtonPressed() { controller.SetVisibility(false); OnMinimize?.Invoke(); }
private void ChatHeadsGroup_OnHeadClose(TaskbarButton obj) { privateChatWindowHud.SetVisibility(false); }