public static void CreateTaggerReturnsSameTaggerWhenCalledMultipleTimesForSameBuffer()
        {
            ITemplateEditorOptions options = OptionsWithErrorUnderliningEnabled(true);
            var target  = new TemplateErrorTaggerProvider(options);
            var buffer  = new FakeTextBuffer(string.Empty);
            var tagger1 = target.CreateTagger <ErrorTag>(buffer);
            var tagger2 = target.CreateTagger <ErrorTag>(buffer);

            Assert.Same(tagger1, tagger2);
        }
        public static void CreateTaggerThrowsArgumentNullExceptionWhenBufferIsNullToFailFast()
        {
            var provider = new TemplateErrorTaggerProvider(Substitute.For <ITemplateEditorOptions>());
            var e        = Assert.Throws <ArgumentNullException>(() => provider.CreateTagger <ErrorTag>(null));

            Assert.Equal("buffer", e.ParamName);
        }
        public static void CreateTaggerReturnsTemplateErrorTagger()
        {
            ITemplateEditorOptions options = OptionsWithErrorUnderliningEnabled(true);
            var target = new TemplateErrorTaggerProvider(options);

            Assert.NotNull(target.CreateTagger <ErrorTag>(new FakeTextBuffer(string.Empty)));
        }
        public static void CreateTaggerDoesNotReturnTaggerWhenErrorUnderliningIsDisabled()
        {
            ITemplateEditorOptions options = OptionsWithErrorUnderliningEnabled(false);
            var target = new TemplateErrorTaggerProvider(options);

            Assert.Null(target.CreateTagger <ErrorTag>(new FakeTextBuffer(string.Empty)));
        }