using System;

namespace QC.CompareTestTree;

[Serializable]
public class TestPreCondition : BaseCondition
{
	private string testIndex = "";

	public string TestIndex
	{
		get
		{
			return testIndex;
		}
		set
		{
			testIndex = value;
		}
	}

	public override bool IsValid
	{
		get
		{
			if (base.IsValid)
			{
				switch (base.TestConditionType)
				{
				case ConditionType.TestParameters:
				case ConditionType.TestResult:
					if (testIndex != "")
					{
						return true;
					}
					break;
				case ConditionType.GlobalVariables:
					return true;
				}
				return false;
			}
			return false;
		}
	}
}
