示例#1
0
        public void write_preview_when_the_cell_value_is_missing_in_the_step()
        {
            var cell = Cell.For <string>("name");
            var step = new Step();

            var tag = new CellTag(cell, step);

            tag.WritePreview(new TestContext());

            tag.Text().ShouldEqual("MISSING");
        }
示例#2
0
        public void write_preview()
        {
            var cell = Cell.For <string>("name");
            var step = new Step().With("name:Jeremy");

            var tag = new CellTag(cell, step);

            tag.WritePreview(new TestContext());

            tag.Text().ShouldEqual("Jeremy");
            tag.HasClass(HtmlClasses.INPUT).ShouldBeTrue();
        }
示例#3
0
        public void write_preview_when_the_cell_value_is_blank()
        {
            var cell = Cell.For <string>("name");
            var step = new Step();

            step.Set("name", string.Empty);

            var tag = new CellTag(cell, step);

            tag.WritePreview(new TestContext());

            tag.Text().ShouldEqual(Step.BLANK);
        }
示例#4
0
        public void write_preview_when_the_cell_value_is_null_in_the_step()
        {
            var cell = Cell.For <string>("name");
            var step = new Step();

            step.Set("name", null);

            var tag = new CellTag(cell, step);

            tag.WritePreview(new TestContext());

            tag.Text().ShouldEqual(Step.NULL);
        }