Bump test project dependencies
- Castle.Core, Moq, and xUnit versions were all out of date
- hold xunit.runner.visualstudio version back in .NET SDK test projects
- can be moved to latest version after we stop testing on netcoreapp2.1
- add missing xunit.analyzers reference to System.Web.Razor.Test project
- move all test projects to .NET v4.6.2 (a supported framework)
- remove `netstandard` reference in System.Net.Http.Formatting.Test; not needed w/ new TFM & updated references
- further separate build of Microsoft.TestCommon project when invoked from NetCore.Test project
- special case `RestorePackages` for this case
- add System.Net.Http references to avoid conflicting versions e.g. src/ and test/ TFMs differ
React to changed xUnit APIs
- adjust Microsoft.TestCommon code
- nit: use `Array.Empty<byte>()` in `TranscodingStreamTests`
- `TranscodingStream` `internal`s can be `private` instead
Resolve xUnit issues new analyzers find
- address xUnit2000 warnings
- pass expected values to `Assert.Equal(...)` as correct (left) argument
- make generic method types explicit to avoid
`error CS0121: The call is ambiguous between the following methods or properties: ...`
- note: cannot remove unnecessary xUnit1013 suppression
- related bug (xunit/xunit#1466) apparently not fixed in 1.0.0 analyzers package
- was xunit/xunit.analyzers#82 fix (in 2017) insufficient?
React to new Moq changes
- avoid `ProtectedMock\`1.ThrowIfPublicMethod(...)` `throw`ing
- use new overloads introduced in the Moq 4.11.0 release
- adjust to Moq hiding the `ObjectProxy` type better
- update `ControllerContext` mocking to avoid NREs
- setting `HttpContext.User` on the `Object` left `get` value `null` (did nothing)
- nit: use `SetupGet(...)` for another property