Automation.UI.Tests.TestConditionOperators.TestOrCondition C# (CSharp) Method

TestOrCondition() private method

private TestOrCondition ( ) : void
return void
        public void TestOrCondition()
        {
            const string nameToSearch1 = "UIAutomation";
            const string nameToSearch2 = "Visual Studio";
            // Fire the query.
            var window = Query().Where()
                .Name().StartsWith(nameToSearch1)
                .Or()
                .Name().Contains(nameToSearch2)
                .Select().FirstResult();
            // Validate the result.
            Assert.IsNotNull(window);
            var currentName = window.Element.Current.Name;
            Assert.IsTrue(currentName.StartsWith(nameToSearch1) || currentName.EndsWith(nameToSearch2));
        }