public void TestByIsCancel() { var buttons = TreeUtility.LogicalTree((AppVar)_ctrl).ByType <Button>(); AppVar button5 = ButtonSearcher.ByIsCancel(buttons).Single(); Assert.AreEqual(button5, _ctrl._button5); }
public void TestByCommandParameterText() { var buttons = TreeUtility.LogicalTree((AppVar)_ctrl).ByType <Button>(); AppVar button4 = ButtonSearcher.ByCommandParameterText(buttons, "A").Single(); Assert.AreEqual(button4, _ctrl._button4); }
public void TestByCommand() { var buttons = TreeUtility.LogicalTree((AppVar)_ctrl).ByType <Button>(); AppVar button2 = ButtonSearcher.ByCommand(buttons, ApplicationCommands.Close).Single(); Assert.AreEqual(button2, _ctrl._button2); button2 = ButtonSearcher.ByCommand(buttons, typeof(ApplicationCommands).FullName, "Close").Single(); Assert.AreEqual(button2, _ctrl._button2); }
public void TestByCommandParameterEnum() { var buttons = TreeUtility.LogicalTree((AppVar)_ctrl).ByType <Button>(); AppVar button4 = ButtonSearcher.ByCommandParameter(buttons, CommandPrameterType.A).Single(); Assert.AreEqual(button4, _ctrl._button4); button4 = ButtonSearcher.ByCommandParameter(buttons, new ExplicitAppVar(_app.Copy(CommandPrameterType.A))).Single(); Assert.AreEqual(button4, _ctrl._button4); }
public void TestByCommandParameter() { var buttons = TreeUtility.LogicalTree((AppVar)_ctrl).ByType <Button>(); AppVar button1 = ButtonSearcher.ByCommandParameter(buttons, "button1").Single(); Assert.AreEqual(button1, _ctrl._button1); button1 = ButtonSearcher.ByCommandParameter(buttons, new ExplicitAppVar(_app.Copy("button1"))).Single(); Assert.AreEqual(button1, _ctrl._button1); }