コード例 #1
0
        public void Should_be_able_to_create_renderer()
        {
            WindowHtmlBuilderFactory factory = new WindowHtmlBuilderFactory();

            IWindowHtmlBuilder renderer = factory.Create(WindowTestHelper.CreateWindow(null));

            Assert.IsType <WindowHtmlBuilder>(renderer);
        }
コード例 #2
0
        public WindowRenderingTests()
        {
            textWriter = new Mock <TextWriter>();

            tagBuilder = new Mock <IWindowHtmlBuilder>();
            rootTag    = new Mock <IHtmlNode>();
            rootTag.SetupGet(t => t.Children).Returns(() => new List <IHtmlNode>());

            headerTag = new Mock <IHtmlNode>();
            headerTag.SetupGet(t => t.Children).Returns(() => new List <IHtmlNode>());
            headerTag.Setup(t => t.AppendTo(It.IsAny <IHtmlNode>())).Returns(headerTag.Object);

            tagBuilder.Setup(t => t.WindowTag()).Returns(rootTag.Object);
            tagBuilder.Setup(t => t.HeaderTag()).Returns(headerTag.Object);

            window      = WindowTestHelper.CreateWindow(tagBuilder.Object);
            window.Name = "Window";
        }
コード例 #3
0
 public WindowBuilderTests()
 {
     component = WindowTestHelper.CreateWindow(null);
     builder   = new WindowBuilder(component);
 }
コード例 #4
0
 public WindowHtmlBuilderTests()
 {
     window      = WindowTestHelper.CreateWindow(null);
     renderer    = new WindowHtmlBuilder(window);
     window.Name = "Window";
 }