Ejemplo n.º 1
0
        public void matches_delegates()
        {
            var builder = new LambdaTagBuilder<FakeSubject>(x => x.Level > 10, x => new HtmlTag("div"));

            builder.Matches(new FakeSubject{Level = 5}).ShouldBeFalse();
            builder.Matches(new FakeSubject{Level = 11}).ShouldBeTrue();
        }
Ejemplo n.º 2
0
        public void build_delegates()
        {
            var builder = new LambdaTagBuilder<FakeSubject>(x => x.Level > 10, x => new HtmlTag("div").Text(x.Name));

            builder.Build(new FakeSubject{
                Name = "Max"
            })
                .ToString()
                .ShouldEqual("<div>Max</div>");
        }