public void Handle_Add_Button()
        {
            var serializer = new NZazuTableDataXmlSerializer();
            var sut        = new NZazuDataTableField(new FieldDefinition
            {
                Key    = "key",
                Type   = "table01",
                Fields = new[]
                {
                    new FieldDefinition
                    {
                        Key  = "table01_field01",
                        Type = "string"
                    }
                }
            }, ServiceLocator);

            var data = new Dictionary <string, string>
            {
                { "table01_field01__1", "hello" }, { "table01_field01__2", "world" }
            };
            var dataSerialized = serializer.Serialize(data);

            sut.SetValue(dataSerialized);

            var ctrl      = (DynamicDataTable)sut.ValueControl;
            var lastadded = ctrl.LayoutGrid.Children[2];

            lastadded.Should().NotBeNull();

            // lets see if it adds a row
            ctrl.LayoutGrid.RowDefinitions.Count.Should().Be(3);
            sut.AddRowAbove(lastadded);
            ctrl.LayoutGrid.RowDefinitions.Count.Should().Be(4);
        }
 public void Be_Disposable()
 {
     using (var sut = new NZazuDataTableField(new FieldDefinition
     {
         Key = "table01",
         Fields = new[]
         {
             new FieldDefinition {
                 Key = "table01_field01", Type = "string"
             },
             new FieldDefinition {
                 Key = "table01_field02", Type = "bool"
             }
         }
     }, ServiceLocator))
     {
         sut.AddRowAbove(sut.ValueControl);
     }
 }