Ejemplo n.º 1
0
 public void WhenAToolTipIsPassedIntoTheCtorForToolTip_ThenTheToolTipContentMatches()
 {
     const string errorType = PredefinedErrorTypeNames.SyntaxError;
     const string expected = "tooltip";
     var tag = new ErrorTokenTag<object>( expected, errorType );
     Assert.Equal( expected, tag.ToolTipContent );
 }
Ejemplo n.º 2
0
 public void WhenAnErrorTypeIsPassedIntoTheCtorForToolTip_ThenTheErrorTypePropertyMatches()
 {
     const string expected = PredefinedErrorTypeNames.SyntaxError;
     const string tooltip = "tooltip";
     var tag = new ErrorTokenTag<object>( tooltip, expected );
     Assert.Equal( expected, tag.ErrorType );
 }
Ejemplo n.º 3
0
 public void WhenAClassificationTypeIsPassedIntoTheCtor_ThenTheCorrespondingPropertiesAreSetProperly()
 {
     var tag = new ErrorTokenTag<object>( "Error" ) { Span = new SnapshotSpan() };
     var tagSpan = new TokenTagSpan<ITokenTag<object>, object>( tag );
     Assert.Equal( tag.Span, tagSpan.Span );
     Assert.Equal( tag, tagSpan.Tag );
 }
Ejemplo n.º 4
0
        public void WhenAToolTipIsPassedIntoTheCtorForToolTip_ThenTheToolTipContentMatches()
        {
            const string errorType = PredefinedErrorTypeNames.SyntaxError;
            const string expected  = "tooltip";
            var          tag       = new ErrorTokenTag <object>(expected, errorType);

            Assert.Equal(expected, tag.ToolTipContent);
        }
Ejemplo n.º 5
0
        public void WhenAnErrorTypeIsPassedIntoTheCtorForToolTip_ThenTheErrorTypePropertyMatches()
        {
            const string expected = PredefinedErrorTypeNames.SyntaxError;
            const string tooltip  = "tooltip";
            var          tag      = new ErrorTokenTag <object>(tooltip, expected);

            Assert.Equal(expected, tag.ErrorType);
        }
Ejemplo n.º 6
0
        public void WhenAClassificationTypeIsPassedIntoTheCtor_ThenTheCorrespondingPropertiesAreSetProperly()
        {
            var tag = new ErrorTokenTag <object>("Error")
            {
                Span = new SnapshotSpan()
            };
            var tagSpan = new TokenTagSpan <ITokenTag <object>, object>(tag);

            Assert.Equal(tag.Span, tagSpan.Span);
            Assert.Equal(tag, tagSpan.Tag);
        }
 protected override object GetToolTip(ErrorTokenTag <TToken> tokenTag)
 {
     return(tokenTag.ToolTipContent);
 }