diff --git a/src/Analysis/Ast/Test/FluentAssertions/AssertionsUtilities.cs b/src/Analysis/Ast/Test/FluentAssertions/AssertionsUtilities.cs index 70ad06871..83ff1b3a1 100644 --- a/src/Analysis/Ast/Test/FluentAssertions/AssertionsUtilities.cs +++ b/src/Analysis/Ast/Test/FluentAssertions/AssertionsUtilities.cs @@ -188,38 +188,38 @@ public static string DoubleEscape(string input) => input.Replace("\r", "\\\u200Br").Replace("\n", "\\\u200Bn").Replace("\t", @"\t"); [CustomAssertion] - public static Continuation AssertIsNotNull(this AssertionScope assertionScope, T instance, string subjectName, string itemName, string accessorName) + public static Continuation AssertIsNotNull(this IAssertionScope IAssertionScope, T instance, string subjectName, string itemName, string accessorName) where T : class - => assertionScope.ForCondition(!(instance is null)) + => IAssertionScope.ForCondition(!(instance is null)) .FailWith($"Expected {subjectName} to have {itemName}{{reason}}, but {accessorName} is null."); [CustomAssertion] - public static Continuation AssertAtIndex(this AssertionScope assertionScope, IReadOnlyList collection, int index, string subjectName, string itemName) - where T : class => assertionScope.ForCondition(collection.Count > index) + public static Continuation AssertAtIndex(this IAssertionScope IAssertionScope, IReadOnlyList collection, int index, string subjectName, string itemName) + where T : class => IAssertionScope.ForCondition(collection.Count > index) .FailWith($"Expected {subjectName} to have {itemName} of type {typeof(T).Name} at index {index}{{reason}}, but collection has only {collection.Count} items.", subjectName, itemName) .Then .ForCondition(collection[index] is TItem) .FailWith($"Expected {subjectName} to have {itemName} of type `{typeof(T).Name}` at index {index}{{reason}}, but its type is `{collection[index].GetType().Name}`."); [CustomAssertion] - public static Continuation AssertHasMember(this AssertionScope assertionScope, IMember m, string memberName, string analysisValueName, string memberPrintName, out IMember member) { + public static Continuation AssertHasMember(this IAssertionScope IAssertionScope, IMember m, string memberName, string analysisValueName, string memberPrintName, out IMember member) { var t = m.GetPythonType(); t.Should().BeAssignableTo(); try { member = ((IMemberContainer)m).GetMember(memberName); } catch (Exception e) { member = null; - return assertionScope.FailWith($"Expected {analysisValueName} to have a {memberPrintName}{{reason}}, but {nameof(t.GetMember)} has failed with exception: {e}."); + return IAssertionScope.FailWith($"Expected {analysisValueName} to have a {memberPrintName}{{reason}}, but {nameof(t.GetMember)} has failed with exception: {e}."); } - return assertionScope.ForCondition(!(member is null)) + return IAssertionScope.ForCondition(!(member is null)) .FailWith($"Expected {analysisValueName} to have a {memberPrintName}{{reason}}."); } [CustomAssertion] - public static Continuation AssertHasMemberOfType(this AssertionScope assertionScope, IPythonType type, string memberName, string analysisValueName, string memberPrintName, out TMember typedMember) + public static Continuation AssertHasMemberOfType(this IAssertionScope IAssertionScope, IPythonType type, string memberName, string analysisValueName, string memberPrintName, out TMember typedMember) where TMember : class, IPythonType { - var continuation = assertionScope.AssertHasMember(type, memberName, analysisValueName, memberPrintName, out var member) + var continuation = IAssertionScope.AssertHasMember(type, memberName, analysisValueName, memberPrintName, out var member) .Then .ForCondition(member is TMember) .FailWith($"Expected {analysisValueName} to have a {memberPrintName} of type {typeof(TMember)}{{reason}}, but its type is {member.GetType()}."); diff --git a/src/Analysis/Ast/Test/Microsoft.Python.Analysis.Tests.csproj b/src/Analysis/Ast/Test/Microsoft.Python.Analysis.Tests.csproj index 2e5dfb031..70000c11c 100644 --- a/src/Analysis/Ast/Test/Microsoft.Python.Analysis.Tests.csproj +++ b/src/Analysis/Ast/Test/Microsoft.Python.Analysis.Tests.csproj @@ -23,15 +23,15 @@ - + - - + + all runtime; build; native; contentfiles; analyzers - + diff --git a/src/Core/Test/Microsoft.Python.Core.Tests.csproj b/src/Core/Test/Microsoft.Python.Core.Tests.csproj index 131762ab6..f475b7992 100644 --- a/src/Core/Test/Microsoft.Python.Core.Tests.csproj +++ b/src/Core/Test/Microsoft.Python.Core.Tests.csproj @@ -27,10 +27,10 @@ - + - - + + all runtime; build; native; contentfiles; analyzers diff --git a/src/LanguageServer/Impl/Microsoft.Python.LanguageServer.csproj b/src/LanguageServer/Impl/Microsoft.Python.LanguageServer.csproj index c14e1229b..1ee0e8a67 100644 --- a/src/LanguageServer/Impl/Microsoft.Python.LanguageServer.csproj +++ b/src/LanguageServer/Impl/Microsoft.Python.LanguageServer.csproj @@ -30,8 +30,8 @@ runtime; build; native; contentfiles; analyzers - - + + diff --git a/src/LanguageServer/Test/Microsoft.Python.LanguageServer.Tests.csproj b/src/LanguageServer/Test/Microsoft.Python.LanguageServer.Tests.csproj index 85c33691c..dd43c522b 100644 --- a/src/LanguageServer/Test/Microsoft.Python.LanguageServer.Tests.csproj +++ b/src/LanguageServer/Test/Microsoft.Python.LanguageServer.Tests.csproj @@ -23,15 +23,15 @@ - + - - + + all runtime; build; native; contentfiles; analyzers - + diff --git a/src/Parsing/Test/Microsoft.Python.Parsing.Tests.csproj b/src/Parsing/Test/Microsoft.Python.Parsing.Tests.csproj index 23ff93b1d..b0c838cfb 100644 --- a/src/Parsing/Test/Microsoft.Python.Parsing.Tests.csproj +++ b/src/Parsing/Test/Microsoft.Python.Parsing.Tests.csproj @@ -27,10 +27,10 @@ - + - - + + all runtime; build; native; contentfiles; analyzers diff --git a/src/UnitTests/Core/Impl/UnitTests.Core.csproj b/src/UnitTests/Core/Impl/UnitTests.Core.csproj index 165ef15c4..b4b821830 100644 --- a/src/UnitTests/Core/Impl/UnitTests.Core.csproj +++ b/src/UnitTests/Core/Impl/UnitTests.Core.csproj @@ -8,8 +8,8 @@ - - + + all runtime; build; native; contentfiles; analyzers