Beispiel #1
0
 public override void Dispose()
 {
     view.Dispose();
     profileFetcher.Dispose();
     friendsSearchPromptController.Dispose();
     usersSearchPromptController.Dispose();
 }
        public void SearchUserCorrectly()
        {
            UsersSearchPromptController controller = new UsersSearchPromptController(promptView);

            controller.Show();
            promptView.searchInputField.OnSubmit("Temp");
            controller.usersSearchPromise.Resolve(new []
            {
                new UserProfileModel()
                {
                    userId = "Temp"
                },
                new UserProfileModel()
                {
                    userId = "ta"
                },
                new UserProfileModel()
                {
                    userId = "tion"
                },
            });

            Assert.AreEqual(3, promptView.friendListParent.childCount);
            Assert.IsTrue(controller.userViewsHandler.userElementViews["Temp"].gameObject.activeSelf);
            Assert.IsTrue(controller.userViewsHandler.userElementViews["ta"].gameObject.activeSelf);
            Assert.IsTrue(controller.userViewsHandler.userElementViews["tion"].gameObject.activeSelf);

            controller.Dispose();
        }