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); }
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)); }
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); }