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!"); }
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); }