public IEnumerator TestDefaultStateSetting() { // Create an interactive cube InteractiveElement interactiveElement = CreateInteractiveCube(); yield return(null); int newStateCount = 5; // Add new states for (int i = 0; i < newStateCount; i++) { interactiveElement.AddNewState("State" + i.ToString()); yield return(null); } // The Default state should only be active if no other states are active Assert.True(interactiveElement.IsStateActive(defaultStateName)); // Set each new states to active for (int i = 0; i < newStateCount; i++) { interactiveElement.SetStateOn("State" + i.ToString()); // If any other state is active, the Default state should not be active Assert.False(interactiveElement.IsStateActive(defaultStateName)); } // Set all states to not be active for (int i = 0; i < newStateCount; i++) { interactiveElement.SetStateOff("State" + i.ToString()); } yield return(null); // After all the states are deactivated, the Default state should be active Assert.True(interactiveElement.IsStateActive(defaultStateName)); }