Example #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");
        }
Example #2
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);
        }
Example #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);
        }
Example #4
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");
        }
Example #5
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();
        }
Example #6
0
        public void write_results_when_the_cell_is_just_an_input()
        {
            var cell = Cell.For<string>("name");
            cell.IsResult = false;
            var step = new Step().With("name:Jeremy");

            var tag = new CellTag(cell, step);
            tag.WriteResults(new StepResults(), new TestContext());

            tag.Text().ShouldEqual("Jeremy");
            tag.HasClass(HtmlClasses.INPUT).ShouldBeTrue();
        }
Example #7
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();
        }
Example #8
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);
        }
Example #9
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);
        }
Example #10
0
        public void write_results_when_the_cell_is_just_an_input()
        {
            var cell = Cell.For <string>("name");

            cell.IsResult = false;
            var step = new Step().With("name:Jeremy");

            var tag = new CellTag(cell, step);

            tag.WriteResults(new StepResults(), new TestContext());

            tag.Text().ShouldEqual("Jeremy");
            tag.HasClass(HtmlClasses.INPUT).ShouldBeTrue();
        }
Example #11
0
 public void the_text_should_just_be_the_expected_text()
 {
     tag.Text().ShouldEqual("Jeremy");
 }
Example #12
0
 public void should_have_the_parsed_display_of_the_actual()
 {
     tag.Text().ShouldEqual("Jeremy (no result)");
 }
Example #13
0
 public void should_have_the_parsed_display_of_the_actual()
 {
     tag.Text().ShouldEqual("Jeremy, but was 'Chad'");
 }