Exemple #1
0
        public void Match_GivenNullSpan_ReturnsFalse()
        {
            var sut = new NullSpanTranslator();

            var result = sut.Match(null);

            Assert.IsFalse(result);
        }
Exemple #2
0
        public void Match_GivenSpanKindComment_ReturnsFalse()
        {
            var span = new Span(new SpanBuilder()
            {
                Kind = SpanKind.Comment, CodeGenerator = null
            });

            var sut = new NullSpanTranslator();

            var result = sut.Match(span);

            Assert.IsFalse(result);
        }
Exemple #3
0
        public void Match_GivenMarkupCodeGeneratorSpan_ReturnsFalse()
        {
            var span = new Span(new SpanBuilder()
            {
                Kind = SpanKind.Markup, CodeGenerator = new MarkupCodeGenerator()
            });

            var sut = new NullSpanTranslator();

            var result = sut.Match(span);

            Assert.IsFalse(result);
        }
Exemple #4
0
        public void Match_GivenMarkupKindAndNullCodeGenerator_ReturnsTrue()
        {
            var span = new Span(new SpanBuilder()
            {
                Kind = SpanKind.Markup, CodeGenerator = null
            });

            var sut = new NullSpanTranslator();

            var result = sut.Match(span);

            Assert.IsTrue(result);
        }