public void Match_GivenNullSpan_ReturnsFalse() { var sut = new GenericCodeSpanTranslator(); var result = sut.Match(null); Assert.IsFalse(result); }
public void Match_GivenCodeSpan_ReturnsTrue() { Span codeSpan = SpanHelper.BuildSpan("a", SpanKind.Code); var sut = new GenericCodeSpanTranslator(); var result = sut.Match(codeSpan); Assert.IsTrue(result); }
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)); }
public void Translate_GivenNullTemplateBuilder_ThrowsArgumentNullException() { var sut = new GenericCodeSpanTranslator(); sut.Translate("a", null); }
public void SupportedType_ReturnsGenericCodeStatement() { var sut = new GenericCodeSpanTranslator(); Assert.AreEqual(StatementTypes.GenericCodeStatement, sut.SupportedType); }
public void ImplementsInterface() { var sut = new GenericCodeSpanTranslator(); Assert.IsInstanceOfType(sut, typeof(ICodeSpanTranslator)); }