예제 #1
0
 		public void ProviderFromPeer ()
 		{
 			ConcreteFrameworkElement element = new ConcreteFrameworkElement ();
 			ConcreteAutomationPeer peer = new ConcreteAutomationPeer (element);
 
 			IRawElementProviderSimple proxy0 = peer.ProviderFromPeer_ (peer);
 			IRawElementProviderSimple proxy1 = peer.ProviderFromPeer_ (peer);
 
 			Assert.AreNotSame (proxy0, proxy1, "Should be different.");
 
 			Assert.IsNull(peer.ProviderFromPeer_(null), "#0");
 		}
예제 #2
0
        public void ProviderFromPeer()
        {
            ConcreteFrameworkElement element = new ConcreteFrameworkElement();
            ConcreteAutomationPeer   peer    = new ConcreteAutomationPeer(element);

            IRawElementProviderSimple proxy0 = peer.ProviderFromPeer_(peer);
            IRawElementProviderSimple proxy1 = peer.ProviderFromPeer_(peer);

            Assert.AreNotSame(proxy0, proxy1, "Should be different.");

            Assert.IsNull(peer.ProviderFromPeer_(null), "#0");
        }
예제 #3
0
 		public void PeerFromProvider ()
 		{
 			ConcreteFrameworkElement element = new ConcreteFrameworkElement ();
 			ConcreteAutomationPeer peer = new ConcreteAutomationPeer (element);
 
 			IRawElementProviderSimple proxy0 = peer.ProviderFromPeer_ (peer);
 			IRawElementProviderSimple proxy1 = peer.ProviderFromPeer_ (peer);
 
 			AutomationPeer peer0 = peer.PeerFromProvider_ (proxy0);
 			AutomationPeer peer1 = peer.PeerFromProvider_ (proxy1);
 
 			Assert.AreSame (peer0, peer1, "Should not be different.");
 
 			Assert.Throws<NullReferenceException>(delegate {
 				peer.PeerFromProvider_ (null);
 			}, "null");
 		}
예제 #4
0
        public void PeerFromProvider()
        {
            ConcreteFrameworkElement element = new ConcreteFrameworkElement();
            ConcreteAutomationPeer   peer    = new ConcreteAutomationPeer(element);

            IRawElementProviderSimple proxy0 = peer.ProviderFromPeer_(peer);
            IRawElementProviderSimple proxy1 = peer.ProviderFromPeer_(peer);

            AutomationPeer peer0 = peer.PeerFromProvider_(proxy0);
            AutomationPeer peer1 = peer.PeerFromProvider_(proxy1);

            Assert.AreSame(peer0, peer1, "Should not be different.");

            Assert.Throws <NullReferenceException>(delegate {
                peer.PeerFromProvider_(null);
            }, "null");
        }