Exemplo n.º 1
0
        public void SetActiveCorrectly(bool isActive)
        {
            // Arrange
            sceneCatalogView.gameObject.SetActive(!isActive);

            // Act
            sceneCatalogView.SetActive(isActive);

            // Assert
            Assert.AreEqual(isActive, sceneCatalogView.gameObject.activeSelf, "The catalog has not been activated properly!");
        }
Exemplo n.º 2
0
        public IEnumerator SetActiveCorrectly(bool isActive, bool isClosing)
        {
            // Arrange
            sceneCatalogView.isClosing = isClosing;
            sceneCatalogView.gameObject.SetActive(!isActive);

            // Act
            sceneCatalogView.SetActive(isActive);

            // Assert
            if (isActive && isClosing)
            {
                Assert.AreEqual(!isActive, sceneCatalogView.gameObject.activeSelf);
                sceneCatalogView.isClosing = false;
                yield return(null);
            }

            Assert.AreEqual(isActive, sceneCatalogView.gameObject.activeSelf, "The catalog has not been activated properly!");

            yield return(null);

            Assert.IsTrue(true);
        }