public void ProviderPatternTest() { DockProviderLabel label = new DockProviderLabel(); IRawElementProviderSimple provider = ProviderFactory.GetProvider(label); object dockPattern = provider.GetPatternProvider(DockPatternIdentifiers.Pattern.Id); Assert.IsNotNull(dockPattern, "DockPattern."); IDockProvider dockProvider = dockPattern as IDockProvider; Assert.IsNotNull(dockProvider, "IDockProvider "); Assert.AreEqual(provider.HostRawElementProvider, label, "HostRawElementProvider"); Assert.AreEqual(ProviderOptions.ServerSideProvider, provider.ProviderOptions, "ProviderOptions"); Assert.AreEqual(DockStyle.Top.ToString(), provider.GetPropertyValue(AutomationElementIdentifiers.NameProperty.Id), "NameProperty"); dockProvider.SetDockPosition(DockPosition.Right); Assert.AreEqual(DockStyle.Right.ToString(), provider.GetPropertyValue(AutomationElementIdentifiers.NameProperty.Id), "NameProperty"); }
public void ProviderPatternTest () { DockProviderLabel label = new DockProviderLabel (); IRawElementProviderSimple provider = ProviderFactory.GetProvider (label); object dockPattern = provider.GetPatternProvider (DockPatternIdentifiers.Pattern.Id); Assert.IsNotNull (dockPattern, "DockPattern."); IDockProvider dockProvider = dockPattern as IDockProvider; Assert.IsNotNull (dockProvider, "IDockProvider "); Assert.AreEqual (provider.HostRawElementProvider, label, "HostRawElementProvider"); Assert.AreEqual (ProviderOptions.ServerSideProvider, provider.ProviderOptions, "ProviderOptions"); Assert.AreEqual (DockStyle.Top.ToString (), provider.GetPropertyValue (AutomationElementIdentifiers.NameProperty.Id), "NameProperty"); dockProvider.SetDockPosition (DockPosition.Right); Assert.AreEqual (DockStyle.Right.ToString (), provider.GetPropertyValue (AutomationElementIdentifiers.NameProperty.Id), "NameProperty"); }