コード例 #1
0
        public void AddColumnWithSelected()
        {
            SectionRow.Selected();
            var row = (IEnumerable <object>)SectionRow.Build();

            Assert.Equal(row.Last(), "selected");
        }
コード例 #2
0
        public void ApplyUnderlineToLastColumn()
        {
            SectionRow.Underline();
            var row = (IEnumerable <object>)SectionRow.Build();

            Assert.Equal(row.Last(), "_Text_");
        }
コード例 #3
0
        public void ApplySubToLastColumn()
        {
            SectionRow.Sub();
            var row = (IEnumerable <object>)SectionRow.Build();

            Assert.Equal(row.Last(), @"|Text|");
        }
コード例 #4
0
        public void ApplyStrongToLastColumn()
        {
            SectionRow.Strong();
            var row = (IEnumerable <object>)SectionRow.Build();

            Assert.Equal(row.Last(), @"*Text*");
        }
コード例 #5
0
        public void ApplyRawToLastColumn()
        {
            SectionRow.Raw();
            var row = (IEnumerable <object>)SectionRow.Build();

            Assert.Equal(row.Last(), @"!Text!");
        }
コード例 #6
0
        public void ApplyEmphasisToLastColumn()
        {
            SectionRow.Emphasis();
            var row = (IEnumerable <object>)SectionRow.Build();

            Assert.Equal(row.Last(), @"\Text\");
        }
コード例 #7
0
        public void AddColumnWithWarn()
        {
            SectionRow.Warn();
            var row = (IEnumerable <object>)SectionRow.Build();

            Assert.Equal(row.Last(), "warn");
        }
コード例 #8
0
        public void AddColumnWithLoading()
        {
            SectionRow.Loading();
            var row = (IEnumerable <object>)SectionRow.Build();

            Assert.Equal(row.Last(), "loading");
        }
コード例 #9
0
        public void AddColumnWithQuiet()
        {
            SectionRow.Quiet();
            var row = (IEnumerable <object>)SectionRow.Build();

            Assert.Equal(row.Last(), "quiet");
        }
コード例 #10
0
        public void AddColumnWithInfo()
        {
            SectionRow.Info();
            var row = (IEnumerable <object>)SectionRow.Build();

            Assert.Equal(row.Last(), "info");
        }
コード例 #11
0
        public void AddColumnWithFail()
        {
            SectionRow.Fail();
            var row = (IEnumerable <object>)SectionRow.Build();

            Assert.Equal(row.Last(), "fail");
        }
コード例 #12
0
        public void AddColumnWithError()
        {
            SectionRow.Error();

            var row = (IEnumerable <object>)SectionRow.Build();

            Assert.Equal(row.Last(), "error");
        }
コード例 #13
0
        public void ApplySubToLastColumnIf()
        {
            SectionRow.SubIf(false);
            var row = (IEnumerable <object>)SectionRow.Build();

            Assert.Equal(row.Last(), @"Text");

            SectionRow.SubIf(true);
            row = (IEnumerable <object>)SectionRow.Build();

            Assert.Equal(row.Last(), @"|Text|");
        }
コード例 #14
0
        public void ApplyEmphasisToLastColumnIf()
        {
            SectionRow.EmphasisIf(false);
            var row = (IEnumerable <object>)SectionRow.Build();

            Assert.Equal(row.Last(), @"Text");

            SectionRow.EmphasisIf(true);
            row = (IEnumerable <object>)SectionRow.Build();

            Assert.Equal(row.Last(), @"\Text\");
        }
コード例 #15
0
        public void AddColumnWithWarnIf()
        {
            SectionRow.WarnIf(false);
            var row = (IEnumerable <object>)SectionRow.Build();

            Assert.Equal(row.Last(), @"Text");

            SectionRow.WarnIf(true);
            row = (IEnumerable <object>)SectionRow.Build();

            Assert.Equal(row.Last(), @"warn");
        }
コード例 #16
0
        public void AddColumnWithLodaingIf()
        {
            SectionRow.LoadingIf(false);
            var row = (IEnumerable <object>)SectionRow.Build();

            Assert.Equal(row.Last(), @"Text");

            SectionRow.LoadingIf(true);
            row = (IEnumerable <object>)SectionRow.Build();

            Assert.Equal(row.Last(), @"loading");
        }
コード例 #17
0
        public void ApplyUnderlineToLastColumnIf()
        {
            SectionRow.UnderlineIf(false);
            var row = (IEnumerable <object>)SectionRow.Build();

            Assert.Equal(row.Last(), @"Text");

            SectionRow.UnderlineIf(true);
            row = (IEnumerable <object>)SectionRow.Build();

            Assert.Equal(row.Last(), @"_Text_");
        }
コード例 #18
0
ファイル: TabRowShould.cs プロジェクト: zanhaipeng/Glimpse
        public void ReturnObjectArrayOfColumnData()
        {
            var columnObject1 = new { Id = "obj1" };
            var columnObject2 = new { Id = "obj2" };

            SectionRow.Column(columnObject1).Column(columnObject2);

            SectionRow.Build();
            var columnData = (IEnumerable <object>)SectionRow.Build();

            Assert.Equal(2, SectionRow.Columns.Count());
            Assert.Equal(columnObject1, columnData.ElementAt(0));
            Assert.Equal(columnObject2, columnData.ElementAt(1));
        }