コード例 #1
0
ファイル: OutlineTests.cs プロジェクト: jimtonn/foldout
        public void ColumnSetTitleShouldFireChangedEventIfAddedToOutline()
        {
            var outline = new Outline();
            var col     = new TestColumn("Column");

            outline.AddColumn(col);

            using (var scope = outline.Monitor())
            {
                outline.ChangeColumnTitle(col, "newtitle");

                scope.Should().Raise(nameof(Outline.ColumnTitleChanged))
                .WithSender(outline)
                .WithArgs <ColumnTitleChangedEventArgs>(args =>
                                                        args.Column == col &&
                                                        args.PreviousTitle == "Column" &&
                                                        args.NewTitle == "newtitle");
            }
        }