public IEnumerator ConditionNotCompleted() { // Setup object with mocked grabbed property and activate GameObject obj = new GameObject("T1"); obj.AddComponent <TouchedConditionTests.TouchablePropertyMock>(); UsableProperty usableProperty = obj.AddComponent <UsablePropertyMock>(); UsedCondition condition = new UsedCondition(usableProperty); condition.LifeCycle.Activate(); float startTime = Time.time; while (Time.time < startTime + 0.1f) { yield return(null); condition.Update(); } // Assert after doing nothing the condition is not completed. Assert.IsFalse(condition.IsCompleted); }
public UsedCondition(UsableProperty target, string name = null) : this(TrainingReferenceUtils.GetNameFrom(target), name) { }