Example #1
0
        public void Translate_GivenText_CallsTemplateBuilderQuoted()
        {
            var sut = new NullSpanTranslator();

            string input = "asas}}";
            Span   span  = SpanHelper.BuildSpan(input);

            sut.Translate(span, this._templateBuilder.Object);

            this._templateBuilder.Verify(t => t.Write(input, true));
        }
Example #2
0
        public void Translate_GivenAtSign_DoesNotCallTemplateBuilder()
        {
            var sut = new NullSpanTranslator();

            string input = "@";
            Span   span  = SpanHelper.BuildSpan(input);

            sut.Translate(span, this._templateBuilder.Object);

            this._templateBuilder.Verify(t => t.Write(It.IsAny <string>()), Times.Never());
            this._templateBuilder.Verify(t => t.Write(It.IsAny <string>(), It.IsAny <bool>()), Times.Never());
        }
Example #3
0
        public void Translate_GivenNullTemplateBuilder_ThrowsArgumentNullException()
        {
            var sut = new NullSpanTranslator();

            sut.Translate(new Span(new SpanBuilder()), null);
        }
Example #4
0
        public void Translate_GivenNullSpan_ThrowsArgumentNullException()
        {
            var sut = new NullSpanTranslator();

            sut.Translate(null, this._templateBuilder.Object);
        }