public void FactoryTest() { IAbstractItemFactory f = FactoryProducer.GetFactory("shape"); IName s = f.GetItem("Rectangle"); Assert.Equal("Rectangle", s.Name()); f = FactoryProducer.GetFactory("beam"); s = f.GetItem("Rectangle"); Assert.Equal("RectangleBeam", s.Name()); }
public QpAbstractItemStorageBuilder( IAbstractItemFactory itemFactory, IQpUrlResolver qpUrlResolver, IAbstractItemRepository abstractItemRepository, IMetaInfoRepository metaInfoRepository, QpSiteStructureBuildSettings buildSettings, ILogger <QpAbstractItemStorageBuilder> logger) { _itemFactory = itemFactory; _qpUrlResolver = qpUrlResolver; _abstractItemRepository = abstractItemRepository; _metaInfoRepository = metaInfoRepository; _buildSettings = buildSettings; _logger = logger; UsedContentNetNames = new string[2] { KnownNetNames.AbstractItem, KnownNetNames.ItemDefinition }; }