public void ShouldReturnNothingForWrongComponentKey() { ComponentResourceKey key = new ComponentResourceKey(); ResourceLocatorMock resourceLocator = new ResourceLocatorMock(key, null); GridEntryMock entry = new GridEntryMock { Editor = new EditorMock { InlineTemplate = key } }; GridEntryContainerMock container = new GridEntryContainerMock(resourceLocator) { Entry = entry }; Assert.IsNull(container.EditorTemplate); }
public void ShouldReturnEditorWithComponentResourceKey() { ComponentResourceKey key = new ComponentResourceKey(); DataTemplate template = new DataTemplate(); ResourceLocatorMock resourceLocator = new ResourceLocatorMock(key, template); GridEntryMock entry = new GridEntryMock { Editor = new EditorMock { InlineTemplate = key } }; GridEntryContainerMock container = new GridEntryContainerMock(resourceLocator) { Entry = entry }; Assert.AreEqual(template, container.EditorTemplate); }