public void Protected() { ContentControl cc = new ContentControl(); ItemAutomationPeerPoker iap = new ItemAutomationPeerPoker(cc); Assert.AreEqual(String.Empty, iap.GetNameCore_(), "GetNameCore"); Assert.AreEqual(String.Empty, iap.GetItemTypeCore_(), "GetItemTypeCore"); Assert.IsNull(iap.ItemsControlAutomationPeer_, "ItemsControlAutomationPeer"); Assert.IsTrue(Object.ReferenceEquals(cc, iap.Item_), "Item"); TextBlock textBlock = new TextBlock() { Text = "Name" }; cc.Content = textBlock; Assert.AreEqual("Name", iap.GetNameCore_(), "GetNameCore"); }
public void Protected () { ContentControl cc = new ContentControl (); ItemAutomationPeerPoker iap = new ItemAutomationPeerPoker (cc); Assert.AreEqual (String.Empty, iap.GetNameCore_ (), "GetNameCore"); Assert.AreEqual (String.Empty, iap.GetItemTypeCore_ (), "GetItemTypeCore"); Assert.IsNull (iap.ItemsControlAutomationPeer_, "ItemsControlAutomationPeer"); Assert.IsTrue (Object.ReferenceEquals (cc, iap.Item_), "Item"); TextBlock textBlock = new TextBlock () { Text = "Name" }; cc.Content = textBlock; Assert.AreEqual ("Name", iap.GetNameCore_ (), "GetNameCore"); }