diff --git a/Directory.Build.props b/Directory.Build.props index 79f1e8d..18c6d78 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,6 +12,6 @@ - + diff --git a/Server.Tests/Server.Tests.csproj b/Server.Tests/Server.Tests.csproj index e3a69ec..8620eb2 100644 --- a/Server.Tests/Server.Tests.csproj +++ b/Server.Tests/Server.Tests.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/Server.Tests/StringOrMarkupContentExtensions.cs b/Server.Tests/StringOrMarkupContentExtensions.cs new file mode 100644 index 0000000..02df454 --- /dev/null +++ b/Server.Tests/StringOrMarkupContentExtensions.cs @@ -0,0 +1,20 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +using OmniSharp.Extensions.LanguageServer.Protocol.Models; + +namespace SdkLspServer.Tests; + +/// +/// Test helpers for , which is the type of +/// in OmniSharp LanguageServer 0.19.11+. +/// +internal static class StringOrMarkupContentExtensions +{ + public static string GetText(this StringOrMarkupContent content) => + content.String ?? content.MarkupContent?.Value ?? string.Empty; + + public static bool Contains(this StringOrMarkupContent content, string value, StringComparison comparison) => + content.GetText().Contains(value, comparison); +} diff --git a/Server/SdkLspServer.csproj b/Server/SdkLspServer.csproj index ba0777a..8a1cbbc 100644 --- a/Server/SdkLspServer.csproj +++ b/Server/SdkLspServer.csproj @@ -24,15 +24,15 @@ - - + + - - - + + + - +