public void Be_Creatable()
        {
            var sut = new NZazuMultilineField(new FieldDefinition {
                Key = "test"
            }, ServiceLocator);

            sut.Should().NotBeNull();
            sut.Should().BeAssignableTo <INZazuWpfField>();
        }
        public void Create_ValueControl_Even_If_Empty_Hint()
        {
            var sut = new NZazuMultilineField(new FieldDefinition {
                Key = "test"
            }, ServiceLocator);

            var textBox = (TextBox)sut.ValueControl;

            textBox.Should().NotBeNull();
            textBox.Text.Should().BeEmpty();
        }
        public void Get_Set_Value_should_propagate_to_ValueControl_Without_LostFocus()
        {
            var sut = new NZazuMultilineField(new FieldDefinition {
                Key = "test"
            }, ServiceLocator);
            var textBox = (TextBox)sut.ValueControl;

            textBox.Should().NotBeNull();

            sut.GetValue().Should().BeNull();
            textBox.Text.Should().BeNullOrEmpty();

            sut.SetValue("test");
            sut.GetValue().Should().Be("test");
            textBox.Text.Should().Be("test");

            textBox.Text = string.Empty;
            sut.GetValue().Should().BeNullOrEmpty();
        }
        public void Create_TextBox_with_ToolTip_Matching_Description()
        {
            var sut = new NZazuMultilineField(new FieldDefinition
            {
                Key         = "test",
                Hint        = "superhero",
                Description = "check this if you are a registered superhero"
            }, ServiceLocator);

            var textBox = (TextBox)sut.ValueControl;

            textBox.Should().NotBeNull();
            textBox.Text.Should().BeEmpty();
            textBox.AcceptsReturn.Should().Be(true);
            textBox.VerticalAlignment.Should().Be(VerticalAlignment.Stretch);
            textBox.HorizontalAlignment.Should().Be(HorizontalAlignment.Stretch);
            textBox.MinHeight.Should().Be(85);
            textBox.ToolTip.Should().Be(sut.Definition.Description);
        }