diff --git a/Runtime.msbuild b/Runtime.msbuild index 5862d38b4..d53e2e46d 100644 --- a/Runtime.msbuild +++ b/Runtime.msbuild @@ -102,10 +102,20 @@ <_TestDLLsXunit Include="bin\$(Configuration)\test\*.Test.dll" /> - <_TestDLLsXunit Include="bin\$(Configuration)\test\*.Test.*.dll" /> - <_TestDLLsXunit Include="bin\$(Configuration)\Test\NetCore\*.Test.dll" Condition="'$(BuildPortable)' == 'true'" /> - <_XunitProject Include="tools\WebStack.xunit.targets"> - TestAssembly=%(_TestDLLsXunit.FullPath);XmlPath=$(TestResultsDirectory)%(_TestDLLsXunit.FileName)-XunitResults.xml + <_TestDLLsXunit Include="bin\$(Configuration)\test\*\net4*\*.Test.dll" + Condition=" '$(BuildPortable)' == 'true' " /> + <_XunitProject Include="tools\WebStack.testing.targets"> + TestAssembly=%(_TestDLLsXunit.FullPath); + XmlPath=$(TestResultsDirectory)%(_TestDLLsXunit.FileName)-XunitResults.xml + + + <_VSTestDLLs Include="bin\$(Configuration)\test\*\netcoreapp*\*.Test.dll" + Condition=" '$(BuildPortable)' == 'true' "/> + <_XunitProject Include="tools\WebStack.testing.targets" + Condition=" '$(BuildPortable)' == 'true' "> + TestAssembly=%(_VSTestDLLs.FullPath); + XmlPath=$(TestResultsDirectory)%(_VSTestDLLs.FileName)-NetCoreApp-XunitResults.xml; + UseVSTest=true @@ -113,16 +123,9 @@ - + - - - diff --git a/RuntimePortable.sln b/RuntimePortable.sln index f20623fd4..bbe26d3cf 100644 --- a/RuntimePortable.sln +++ b/RuntimePortable.sln @@ -7,11 +7,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A9836F9E-6DB EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{C40883CD-366D-4534-8B58-3EA0D13136DF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.TestCommon", "test\Microsoft.TestCommon\Microsoft.TestCommon.csproj", "{FCCC4CB7-BAF7-4A57-9F89-E5766FE536C0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.TestCommon", "test\Microsoft.TestCommon\Microsoft.TestCommon.csproj", "{FCCC4CB7-BAF7-4A57-9F89-E5766FE536C0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Net.Http.Formatting.NetCore", "src\System.Net.Http.Formatting.NetCore\System.Net.Http.Formatting.NetCore.csproj", "{C7060639-719B-4BD2-8A37-2F146B5A0668}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Net.Http.Formatting.NetCore.Test", "test\System.Net.Http.Formatting.NetCore.Test\System.Net.Http.Formatting.NetCore.Test.csproj", "{8DA61DAC-FF7E-4CA1-93A0-6148DB66FD08}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Http.Formatting.NetCore.Test", "test\System.Net.Http.Formatting.NetCore.Test\System.Net.Http.Formatting.NetCore.Test.csproj", "{8DA61DAC-FF7E-4CA1-93A0-6148DB66FD08}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Http.Formatting.NetStandard", "src\System.Net.Http.Formatting.NetStandard\System.Net.Http.Formatting.NetStandard.csproj", "{636CA76A-C85C-42E2-B4AA-88046279B3CA}" EndProject diff --git a/packages/repositories.config b/packages/repositories.config index 8bede8eeb..22e5c94b2 100644 --- a/packages/repositories.config +++ b/packages/repositories.config @@ -17,11 +17,9 @@ - - diff --git a/test/Directory.Build.props b/test/Directory.Build.props index 8dc298fd2..64681b2ef 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -4,6 +4,9 @@ false true - v4.5.2 + v4.5.2 diff --git a/test/Directory.Build.targets b/test/Directory.Build.targets index 54ff85834..b1167ac05 100644 --- a/test/Directory.Build.targets +++ b/test/Directory.Build.targets @@ -1,6 +1,7 @@ - + diff --git a/test/Microsoft.TestCommon/ExceptionAssertions.cs b/test/Microsoft.TestCommon/ExceptionAssertions.cs index 1d21f04f0..11b36e9e6 100644 --- a/test/Microsoft.TestCommon/ExceptionAssertions.cs +++ b/test/Microsoft.TestCommon/ExceptionAssertions.cs @@ -466,6 +466,7 @@ public static ArgumentOutOfRangeException ThrowsArgumentLessThanOrEqualTo(Action String.Format(CultureReplacer.DefaultCulture, "Value must be less than or equal to {0}.", maxValue), false, actualValue); } +#if !NETCOREAPP /// /// Verifies that the code throws an HttpException (or optionally any exception which derives from it). /// @@ -481,6 +482,7 @@ public static HttpException ThrowsHttpException(Action testCode, string exceptio Equal(httpCode, ex.GetHttpCode()); return ex; } +#endif /// /// Verifies that the code throws an InvalidEnumArgumentException (or optionally any exception which derives from it). diff --git a/test/Microsoft.TestCommon/Microsoft.TestCommon.csproj b/test/Microsoft.TestCommon/Microsoft.TestCommon.csproj index 73887c60e..dae43e747 100644 --- a/test/Microsoft.TestCommon/Microsoft.TestCommon.csproj +++ b/test/Microsoft.TestCommon/Microsoft.TestCommon.csproj @@ -1,128 +1,23 @@ - - + - {FCCC4CB7-BAF7-4A57-9F89-E5766FE536C0} - Library - Properties - Microsoft.TestCommon - Microsoft.TestCommon - false + netcoreapp2.1;net452 ..\..\bin\$(Configuration)\Test\ - false - false - true - false + $(Configurations);CodeAnalysis + false - - - - - - - - - - - ..\..\packages\xunit.abstractions.2.0.1\lib\net35\xunit.abstractions.dll - True - - - ..\..\packages\xunit.assert.2.3.0\lib\netstandard1.1\xunit.assert.dll - True - - - ..\..\packages\xunit.extensibility.core.2.3.0\lib\netstandard1.1\xunit.core.dll - True - - - ..\..\packages\xunit.extensibility.execution.2.3.0\lib\net452\xunit.execution.desktop.dll - True - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - Code - - - - - - - - Code - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - - - - - - - - - - \ No newline at end of file + diff --git a/test/Microsoft.TestCommon/packages.config b/test/Microsoft.TestCommon/packages.config deleted file mode 100644 index d6bfcf037..000000000 --- a/test/Microsoft.TestCommon/packages.config +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/test/System.Net.Http.Formatting.NetCore.Test/System.Net.Http.Formatting.NetCore.Test.csproj b/test/System.Net.Http.Formatting.NetCore.Test/System.Net.Http.Formatting.NetCore.Test.csproj index 7aecee20d..d60e9a90c 100644 --- a/test/System.Net.Http.Formatting.NetCore.Test/System.Net.Http.Formatting.NetCore.Test.csproj +++ b/test/System.Net.Http.Formatting.NetCore.Test/System.Net.Http.Formatting.NetCore.Test.csproj @@ -1,314 +1,87 @@ - - - - + - {8DA61DAC-FF7E-4CA1-93A0-6148DB66FD08} - Library - Properties + net462 System.Net.Http System.Net.Http.Formatting.NetCore.Test ..\..\bin\$(Configuration)\Test\NetCore\ + $(Configurations);CodeAnalysis + false $(DefineConstants);NETFX_CORE + true - - ..\..\packages\Castle.Core.4.2.1\lib\net45\Castle.Core.dll - True - - - ..\..\packages\Moq.4.7.142\lib\net45\Moq.dll - True - - - ..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll - True - - - - - - - ..\..\packages\Microsoft.Net.Http.2.2.13\lib\net45\System.Net.Http.Extensions.dll - - - ..\..\packages\Microsoft.Net.Http.2.2.13\lib\net45\System.Net.Http.Primitives.dll - - - - - - - ..\..\packages\xunit.abstractions.2.0.1\lib\net35\xunit.abstractions.dll - True - - - ..\..\packages\xunit.assert.2.3.0\lib\netstandard1.1\xunit.assert.dll - True - - - ..\..\packages\xunit.extensibility.core.2.3.0\lib\netstandard1.1\xunit.core.dll - True - - - ..\..\packages\xunit.extensibility.execution.2.3.0\lib\net452\xunit.execution.desktop.dll - True - + + + + + all + runtime; build; native; contentfiles; analyzers + + + + + + - - False - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - DataSets\Types\DerivedFormUrlEncodedMediaTypeFormatter.cs - - - Formatting\BsonMediaTypeFormatterTests.cs - - - Internal\FormDataCollectionTests.cs - - - Formatting\FormUrlEncodedFromContentTests.cs - - - Formatting\FormUrlEncodedFromUriQueryTests.cs - - - Internal\FormUrlEncodedJsonTests.cs - - - Formatting\FormUrlEncodedMediaTypeFormatterTests.cs - - - Formatting\JsonNetSerializationTest.cs - - - Formatting\JsonNetValidationTest.cs - - - Internal\FormUrlEncodedParserTests.cs - - - HttpContentFormDataExtensionsTest.cs - - - HttpValueCollectionTest.cs - - - Internal\ReadOnlyStreamWithEncodingPreambleTest.cs - - - MimeBodyPartTest.cs - - - HttpHeaderExtensionsTest.cs - - - HttpUnsortedResponseTest.cs - - - HttpUnsortedRequestTest.cs - - - SFormatting\tringComparisonHelperTest.cs - - - Mocks\MockAsyncCallback.cs - - - Mocks\MockCompletedAsyncResult.cs - - - HttpClientFactoryTest.cs - - - Handlers\ProgressContentTest.cs - - - Handlers\ProgressStreamTest.cs - - - Handlers\HttpProgressEventArgsTest.cs - - - MultipartRelatedStreamProviderTests.cs - - - MultipartStreamProviderTestBase.cs - - - MultipartFileDataTest.cs - - - DataSets\Types\DataContractEnum.cs - - - DataSets\Types\DataContractType.cs - - - DataSets\Types\DerivedDataContractType.cs - - - DataSets\Types\DerivedJsonMediaTypeFormatter.cs - - - DataSets\Types\DerivedWcfPocoType.cs - - - DataSets\Types\DerivedXmlMediaTypeFormatter.cs - - - DataSets\Types\DerivedXmlSerializableType.cs - - - DataSets\HttpTestData.cs - - - DataSets\Types\INotJsonSerializable.cs - - - DataSets\Types\WcfPocoType.cs - - - DataSets\Types\XmlSerializableType.cs - - - Formatting\SerializerConsistencyTests.cs - - - Formatting\XmlSerializerMediaTypeFormatterTests.cs - - - Formatting\MediaTypeFormatterTestBase.cs - - - HttpClientExtensionsTest.cs - - - Internal\AsyncResultTest.cs - - - Internal\DelegatingStreamTest.cs - - - Mocks\MockDelegatingHandler.cs - - - Mocks\MockDelegatingStream.cs - - - Mocks\MockProgressEventHandler.cs - - - Mocks\TestableHttpMessageHandler.cs - - - UriExtensionsTests.cs - - - UriQueryDataSet.cs - - - FormattingUtilitiesTests.cs - - - Formatting\JsonMediaTypeFormatterTests.cs - - - Formatting\MediaTypeConstantsTests.cs - - - Formatting\MediaTypeFormatterCollectionTests.cs - - - Formatting\MediaTypeFormatterTests.cs - - - Formatting\MediaTypeHeaderValueExtensionsTests.cs - - - Formatting\ParsedMediaTypeHeaderValueTests.cs - - - Formatting\XmlMediaTypeFormatterTests.cs - - - HttpContentMessageExtensionsTests.cs - - - HttpContentMultipartExtensionsTests.cs - - - HttpMessageContentTests.cs - - - Formatting\Parsers\HttpRequestHeaderParserTests.cs - - - Formatting\Parsers\HttpRequestLineParserTests.cs - - - Formatting\Parsers\HttpResponseHeaderParserTests.cs - - - Formatting\Parsers\HttpStatusLineParserTests.cs - - - Formatting\Parsers\InternetMessageFormatHeaderParserTests.cs - - - Formatting\Parsers\MimeMultipartParserTests.cs - - - MultipartMemoryStreamProviderTests.cs - - - ObjectContentOfTTests.cs - - - ObjectContentTests.cs - - - ParserData.cs - - - Mocks\MockHttpContent.cs - - - Mocks\MockMediaTypeFormatter.cs - - - HttpContentExtensionsTest.cs - - - PushStreamContentTest.cs - - - ProgressMessageHandlerTest.cs - - - ConcurrentDictionaryTests.cs - - - - - {C7060639-719B-4BD2-8A37-2F146B5A0668} - System.Net.Http.Formatting - - - {FCCC4CB7-BAF7-4A57-9F89-E5766FE536C0} - Microsoft.TestCommon - - - - - - Designer - + + @@ -316,17 +89,12 @@ - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - \ No newline at end of file + diff --git a/test/System.Net.Http.Formatting.NetCore.Test/app.config b/test/System.Net.Http.Formatting.NetCore.Test/app.config deleted file mode 100644 index d0071f86e..000000000 --- a/test/System.Net.Http.Formatting.NetCore.Test/app.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/test/System.Net.Http.Formatting.NetCore.Test/packages.config b/test/System.Net.Http.Formatting.NetCore.Test/packages.config deleted file mode 100644 index 88bf30ad7..000000000 --- a/test/System.Net.Http.Formatting.NetCore.Test/packages.config +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test/System.Net.Http.Formatting.NetStandard.Test/System.Net.Http.Formatting.NetStandard.Test.csproj b/test/System.Net.Http.Formatting.NetStandard.Test/System.Net.Http.Formatting.NetStandard.Test.csproj index 0b89690d5..64d06cf7e 100644 --- a/test/System.Net.Http.Formatting.NetStandard.Test/System.Net.Http.Formatting.NetStandard.Test.csproj +++ b/test/System.Net.Http.Formatting.NetStandard.Test/System.Net.Http.Formatting.NetStandard.Test.csproj @@ -1,17 +1,23 @@  - netcoreapp2.1;net461 + netcoreapp2.1;net462 System.Net.Http System.Net.Http.Formatting.NetStandard.Test - ..\..\bin\$(Configuration)\Test\ + ..\..\bin\$(Configuration)\Test\NetStandard\ $(Configurations);CodeAnalysis false + true + - + + all + runtime; build; native; contentfiles; analyzers + + diff --git a/test/System.Net.Http.Formatting.Test/Internal/HttpValueCollectionTest.cs b/test/System.Net.Http.Formatting.Test/Internal/HttpValueCollectionTest.cs index 626c655aa..03b5aadf0 100644 --- a/test/System.Net.Http.Formatting.Test/Internal/HttpValueCollectionTest.cs +++ b/test/System.Net.Http.Formatting.Test/Internal/HttpValueCollectionTest.cs @@ -27,10 +27,12 @@ private static HttpValueCollection CreateInstance() #endif } +#if !NETCOREAPP private static void RunInIsolation(Action action) { AppDomainUtils.RunInSeparateAppDomain(action); } +#endif public static TheoryDataSet>> KeyValuePairs { diff --git a/tools/WebStack.xunit.targets b/tools/WebStack.testing.targets similarity index 51% rename from tools/WebStack.xunit.targets rename to tools/WebStack.testing.targets index d11eaee74..b802862a0 100644 --- a/tools/WebStack.xunit.targets +++ b/tools/WebStack.testing.targets @@ -5,10 +5,19 @@ --> - - + + + + + <_ExitCodes Include="$(TestAssembly)" Code="$(_ExitCode)" />