Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }