Exemplo n.º 1
0
            public void WhenTextBlock_CreatesComponents()
            {
                var element = new Elements.TextBlock();
                var props   = new Props.TextBlock();

                renderer.UpdateExistingElement(element, props);

                Assert.That(props.Component, Is.Not.Null);
            }
Exemplo n.º 2
0
            public void WhenTextBlock_PreviousElementIsRemoved()
            {
                var element = new Elements.TextBlock();
                var props   = new Props.TextBlock();

                renderer.UpdateExistingElement(element, props);

                renderer.UpdateExistingElement(new Elements.TextBlock(), props);

                Assert.That(props.Component.Element, Is.Not.SameAs(element));
            }
Exemplo n.º 3
0
            public void WhenTextBlock_UpdatesProperties()
            {
                var element = new Elements.TextBlock();
                var props   = new Props.TextBlock {
                    Text = "test", IsEnabled = true, Focusable = true
                };

                renderer.UpdateExistingElement(element, props);

                Assert.That(element.Text, Is.EqualTo(props.Text));
                Assert.That(element.IsEnabled, Is.True);
                Assert.That(element.Focusable, Is.True);
            }