Example #1
0
        public void Translate_CallsTemplateBuilder()
        {
            Mock <ITemplateBuilder> templateBuilder = new Mock <ITemplateBuilder>();
            string expected = "a";

            var sut = new GenericCodeSpanTranslator();

            sut.Translate(expected, templateBuilder.Object);

            templateBuilder.Verify(t => t.AddCodeBlock(expected));
        }
Example #2
0
        public void Translate_GivenNullTemplateBuilder_ThrowsArgumentNullException()
        {
            var sut = new GenericCodeSpanTranslator();

            sut.Translate("a", null);
        }