Exemplo n.º 1
0
        public void CanGetRegisteredFactory()
        {
            UIElementAdapterFactoryCatalog catalog = new UIElementAdapterFactoryCatalog();
            MockFactory factory = new MockFactory();

            catalog.RegisterFactory(factory);

            IUIElementAdapterFactory uiFactory = catalog.GetFactory("Foo");

            Assert.AreSame(factory, uiFactory);
        }
Exemplo n.º 2
0
        public void GetFactoryWhenNoAppropriateFactoryRegisteredThrows()
        {
            UIElementAdapterFactoryCatalog catalog = new UIElementAdapterFactoryCatalog();

            catalog.GetFactory(typeof(object));
        }