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

TestAndCondition() private method

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