Ejemplo n.º 1
0
        public void ApplyTemplate_Should_Create_Panel()
        {
            var target = new DeckPresenter
            {
                ItemsPanel = new FuncTemplate <IPanel>(() => new Panel()),
            };

            target.ApplyTemplate();

            Assert.IsType <Panel>(target.Panel);
        }
Ejemplo n.º 2
0
        public void Setting_SelectedIndex_Should_Show_Page()
        {
            var target = new DeckPresenter
            {
                Items         = new[] { "foo", "bar" },
                SelectedIndex = 0,
            };

            target.ApplyTemplate();

            Assert.IsType <TextBlock>(target.Panel.Children[0]);
            Assert.Equal("foo", ((TextBlock)target.Panel.Children[0]).Text);
        }