Esempio n. 1
0
        public void SwitchParticle_Previous_FlareIsActive()
        {
            var nextButton     = new GameObject().FindByUPath("/UI//Next");
            var previousButton = new GameObject().FindByUPath("/UI//Previous");
            var titleLabel     = new GameObject().FindByUPath("/UI//TitleText");

            previousButton.Should(Be.Present);
            previousButton.Should(Be.ActiveInHierarchy);
            previousButton.Should(Have.ComponentWithPropertyAndValue("Button", "m_Interactable", "true"));
            var onScreen  = previousButton.IsOnScreen;
            var clickable = previousButton.IsHitByGraphicRaycast;

            previousButton.Click();

            titleLabel.Should(Be.ActiveInHierarchy);
            titleLabel.Should(Have.Component("Text"));
            titleLabel.Should(Have.ComponentWithPropertyAndValue("Text", "m_Text", "\"Flare\""));
            var text = titleLabel.GetComponent("Text");

            Assert.IsTrue(text.Contains("Flare"));
        }