public void Constructor() { TestItemBM testItem = new TestItemBM(); CreateNewItemCallbackHandler createNewItemCallbackHandler = delegate(object data) { return(testItem); }; var provider = new CustomNewItemProvider(createNewItemCallbackHandler); Assert.AreEqual(true, provider.IsSupported); Assert.AreEqual(testItem, provider.CreateItem <TestItemBM>(null)); }
/// <summary> Initializes a new instance of the <see cref="CustomNewItemProvider"/> class. /// </summary> /// <param name="createNewItemCallback">The create new item callback.</param> public CustomNewItemProvider(CreateNewItemCallbackHandler createNewItemCallback) { _createNewItemCallback = createNewItemCallback; }