Exemplo n.º 1
0
        public void ChangingRowValueDataShouldFireChangedEvent()
        {
            var outline = new Outline();
            var col     = new TestColumn("Column");

            outline.AddColumn(col);
            var newRow = outline.InsertRow(outline.RootRow, 0);

            using (var scope = outline.Monitor())
            {
                outline.ChangeRowData(newRow, col, "something new");

                scope.Should().Raise(nameof(Outline.RowDataChanged))
                .WithSender(outline)
                .WithArgs <RowDataChangedEventArgs <string> >(args =>
                                                              args.Row == newRow &&
                                                              args.PreviousData == null &&
                                                              args.NewData == "something new");
            }
        }