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 ); }
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 ); }
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 ); }
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); }
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); }
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); }