Improves authoring experience when using TagBuilder by taking advantage of
IHtmlContentBuilder an its extension methods.
TagBuilder.InnerHtml is no longer settable.
- #3066
- reduce `TestServer` -> `PhysicalFileProvider` -> `FileSystemWatcher` count enough to run with Core CLR on Linux
- remove use of `HttpClient.DefaultRequestHeaders`; any client change affects other tests
- remove use of `RequestBuilder` class; creates a per-test `HttpClient` and requires the `TestServer`
- updated a few expectations because `CommonTestEncoder` does JavaScript a bit differently
- "JavaScriptEncode[[...]]" -> "JavaScriptStringEncode[[...]]"
- side benefit: xUnit reports functional tests execute for only ~12.4s; was >30s before this change
Infrastructure: Enhance `MvcTestFixture`
- handle `ConfigureServices()` methods that are not `void`
- handle `Configure(IApplicationBuilder, ILoggerFactory)`
- ensure server is initialized with consistent `CurrentCulture` and `CurrentUICulture`
- add `FilteredDefaultAssemblyProviderFixture<TStartup>` and `MvcEncodedTestFixture<TStartup>`
- add `MvcTextFixture.AddAdditionalServices()` extension point supporting these
- do not expose the `TestServer`; an anti-pattern for tests to manipulate the server
- update class names to match containing files
- use existing `TestApplicationEnvironment`
- apply some `MvcTestFixture` improvements to the shared `TestApplicationEnvironment` class
- remove unused methods from `TestHelper`
nits:
- touched-up some leftover `_app` &c declarations to be more explicit and minimize `using`s
- moved statements into correct sections of methods in `RoutingTests`
- removed `TestLoggerFactory` and related classes from `TagHelperSampleTest`
- use `[ConditionalFact]` or `[ConditionalTheory]` instead
- in some cases test was already conditional
- move other `IsMono` checks into data sets where possible
- not reported as skipped but at least not counted as successful
nit: switch from `[ConditionalTheory]` to `[ConditionalFact]` as appropriate
- slightly more efficient since xUnit won't check for data
- use consistent line endings on all platforms so that hashes and file versions match
- add another `.gitattribute` file
- move files to avoid required index recreation in all Linux repos
Adds a new property, FieldName, to ModelBindingContext. The FieldName is
the name of whatever code-element is being bound, regardless of what
model-prefix is in use.
This is needed for cases like the Header model binder. We always want to
use the property/parameter name and we don't care about model prefixes.