diff --git a/.gitignore b/.gitignore
index 9adba68fb4..c95bfafac8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,7 +14,7 @@ obj/
*.vspscc
# Test results
-sln/TestResults/
+**/TestResults/
test/packages/
*BenchmarkDotNet.Artifacts*
diff --git a/buildandtest.yml b/buildandtest.yml
index 976e497b3f..247ff14625 100644
--- a/buildandtest.yml
+++ b/buildandtest.yml
@@ -32,15 +32,15 @@ steps:
displayName: 'Test'
inputs:
command: 'test'
- arguments: '--configuration $(BuildConfiguration) --no-build --collect "Code coverage"'
+ arguments: '--configuration $(buildConfiguration) --settings $(Build.SourcesDirectory)\test.runsettings --no-build --collect "Code Coverage"'
projects: |
$(Build.SourcesDirectory)\sln\OData.Pipeline.sln
- task: DotNetCoreCLI@2
condition: eq(variables.buildConfiguration, 'Release')
- displayName: 'Test'
+ displayName: 'Test - Microsoft.OData.Client.E2E.Tests'
inputs:
command: 'test'
- arguments: '--configuration $(buildConfiguration) --collect "Code coverage"'
+ arguments: '--configuration $(buildConfiguration) --settings $(Build.SourcesDirectory)\test.runsettings --collect "Code Coverage"'
projects: |
$(Build.SourcesDirectory)\test\EndToEndTests\Tests\Client\Microsoft.OData.Client.E2E.Tests\Microsoft.OData.Client.E2E.Tests.csproj
diff --git a/test.runsettings b/test.runsettings
new file mode 100644
index 0000000000..48ea0c33e4
--- /dev/null
+++ b/test.runsettings
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ .*Microsoft\.OData\.Core\.dll$
+ .*Microsoft\.OData\.Edm\.dll$
+ .*Microsoft\.OData\.Client\.dll$
+ .*Microsoft\.Spatial\.dll$
+
+
+ .*CPPUnitTestFramework.*
+
+
+
+
+
+
+
+ ^System\.Diagnostics\.DebuggerHiddenAttribute$
+ ^System\.Diagnostics\.DebuggerNonUserCodeAttribute$
+ ^System\.CodeDom\.Compiler\.GeneratedCodeAttribute$
+ ^System\.Diagnostics\.CodeAnalysis\.ExcludeFromCodeCoverageAttribute$
+
+
+
+ True
+ True
+ True
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+ false
+ false
+ false
+ False
+
+
\ No newline at end of file
diff --git a/test/FunctionalTests/Tests/DataOData/Tests/OData.PluggableFormat/Microsoft.Test.OData.PluggableFormat.csproj b/test/FunctionalTests/Tests/DataOData/Tests/OData.PluggableFormat/Microsoft.Test.OData.PluggableFormat.csproj
index d8560b1a16..a5b4515bf9 100644
--- a/test/FunctionalTests/Tests/DataOData/Tests/OData.PluggableFormat/Microsoft.Test.OData.PluggableFormat.csproj
+++ b/test/FunctionalTests/Tests/DataOData/Tests/OData.PluggableFormat/Microsoft.Test.OData.PluggableFormat.csproj
@@ -27,7 +27,7 @@
-
+
diff --git a/test/FunctionalTests/Tests/DataServices/UnitTests/Client.TDD.Tests/Tests/DeepInsertE2ETests.cs b/test/FunctionalTests/Tests/DataServices/UnitTests/Client.TDD.Tests/Tests/DeepInsertE2ETests.cs
index e8d47a9338..9cdc837e7b 100644
--- a/test/FunctionalTests/Tests/DataServices/UnitTests/Client.TDD.Tests/Tests/DeepInsertE2ETests.cs
+++ b/test/FunctionalTests/Tests/DataServices/UnitTests/Client.TDD.Tests/Tests/DeepInsertE2ETests.cs
@@ -202,7 +202,7 @@ public void CallingDeepInsertRequest_WithNullArguments_ShouldThrowAnException()
[Fact]
public async Task CallingDeepInsertAsyncRequest_WithUntrackedEntity_ShouldThrowAnInvalidException()
{
- Assert.Throws(delegate { this.context.DeepInsertAsync(this.person); });
+ await Assert.ThrowsAsync(() => this.context.DeepInsertAsync(this.person));
}
[Fact]
diff --git a/test/PublicApiTests/Microsoft.OData.PublicApi.Tests.csproj b/test/PublicApiTests/Microsoft.OData.PublicApi.Tests.csproj
index 1c509b7aef..026b8c2bb2 100644
--- a/test/PublicApiTests/Microsoft.OData.PublicApi.Tests.csproj
+++ b/test/PublicApiTests/Microsoft.OData.PublicApi.Tests.csproj
@@ -27,6 +27,7 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
+
\ No newline at end of file