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); }
public void CopyTest() { Dictionary <int, string> dic = new Dictionary <int, string>(); dic.Add(1, "1"); // Object is serialized and a copy will be sent to the target process dynamic dicInTarget = _app.Copy(dic); // Null is useful for out arguments dynamic value = _app.Null(); dicInTarget.TryGetValue(1, value); Assert.AreEqual("1", (string)value); }