예제 #1
0
        public void TestBinding()
        {
            AppVar button1 = Searcher.ByBinding(TreeUtility.LogicalTree(_ctrl), "Button1Command").Single();

            Assert.IsTrue(button1.Equals(_ctrl._button1));

            var collection = Searcher.ByBinding(TreeUtility.LogicalTree(_ctrl), "DataText");

            Assert.AreEqual(2, collection.Count);

            var textBox = Searcher.ByBinding(TreeUtility.LogicalTree(_ctrl), "DataText", new ExplicitAppVar(_ctrl.DataContext)).Single();

            Assert.IsTrue(textBox.Equals(_ctrl._textBox));
        }
예제 #2
0
        public void TestBindingExtensions()
        {
            AppVar target  = _ctrl;
            AppVar button1 = target.LogicalTree().ByBinding("Button1Command").Single();

            Assert.IsTrue(button1.Equals(_ctrl._button1));

            var collection = target.LogicalTree().ByBinding("DataText");

            Assert.AreEqual(2, collection.Count);

            var textBox = target.LogicalTree().ByBinding("DataText", new ExplicitAppVar(_ctrl.DataContext)).Single();

            Assert.IsTrue(textBox.Equals(_ctrl._textBox));
        }
예제 #3
0
        /// <summary>
        /// Equality. Returns the result of carrying out the equality operation inside the target application.
        /// </summary>
        /// <param name="obj">Object to compare.</param>
        /// <returns>Comparison result.</returns>
#else
        /// <summary>
        /// 等価比較。 操作対象アプリケーション内部で実施した結果を返します。
        /// </summary>
        /// <param name="obj">オブジェクト。</param>
        /// <returns>比較結果。</returns>
#endif
        public override bool Equals(object obj)
        {
            return(_appVar.Equals(obj));
        }