Пример #1
0
        public void add_a_closed_writer_happy_path()
        {
            var writer = new SpecialWriter();
            var node   = new OutputNode(typeof(Address));

            node.Add(writer);

            var media = node.Explicits.Single().ShouldBeOfType <Media <Address> >();

            media.Writer.ShouldBeTheSameAs(writer);
            media.Condition.ShouldBeTheSameAs(Always.Flyweight);
        }
Пример #2
0
        public void add_a_closed_writer_with_conditional()
        {
            var condition = new IsAjaxRequest();
            var writer    = new SpecialWriter();
            var node      = new OutputNode(typeof(Address));

            node.Add(writer, condition);

            var media = node.Explicits.Single().ShouldBeOfType <Media <Address> >();

            media.Writer.ShouldBeTheSameAs(writer);
            media.Condition.ShouldBeTheSameAs(condition);
        }