Commit Graph

2066 Commits

Author SHA1 Message Date
Ryan Nowak ef730790d4 Fix tests broken by renames 2015-09-17 07:40:15 -07:00
Ryan Nowak 538cd9c191 Move less-commonly used types out of .Rendering 2015-09-16 23:52:29 -07:00
Ryan Nowak 046cb976b3 Move ActionResult classes back to main namespace 2015-09-16 21:42:31 -07:00
Pranav K 1c4614c219 Avoid allocating strings in DefaultViewLocationCache
Fixes #3135
2015-09-16 17:28:40 -07:00
Pranav K 00075520b4 Razor CompilerCache allocates too much in NormalizePath
Fixes #3035
2015-09-16 16:55:51 -07:00
Ryan Nowak 9a15b54d30 Flow IHtmlContent through to the razor buffer 2015-09-16 16:17:40 -07:00
Ryan Nowak a707311d9e Fix #3087 - use IHtmlContentBuilder in TagBuilder
Improves authoring experience when using TagBuilder by taking advantage of
IHtmlContentBuilder an its extension methods.

TagBuilder.InnerHtml is no longer settable.
2015-09-16 10:03:03 -07:00
Doug Bunting d03a851ab3 Use `MvcTextFixture` as much as possible
- #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`
2015-09-15 10:18:27 -07:00
Doug Bunting 6459fb0e30 Do not execute no-op tests
- consistently use `TestPlatformHelper` only to skip test cases or change expectations
2015-09-14 15:30:45 -07:00
Pranav K 887ab64d75 Throw an exception if layouts have circular references.
Fixes #3100
2015-09-14 12:57:06 -07:00
Kiran Challa c79469c3b3 React to Cors api changes 2015-09-14 11:21:40 -07:00
Doug Bunting 29a25b2ed1 No need to add an instance in `WebApiCompatShimMvcBuilderExtensions`
- DI has changed since this class was written
2015-09-13 22:25:04 -07:00
N. Taylor Mullen 93735a5be6 React to Razor `TargetElementAttribute` rename.
aspnet/Razor#516
2015-09-13 19:14:30 -07:00
Ryan Nowak 94388a8804 React to BufferedHtmlContent changes 2015-09-13 13:51:53 -07:00
Pranav K 85bb33a62a Fixing formatting in RoslynCompilationService 2015-09-11 12:22:34 -07:00
Pranav K 345021d822 Set RazorError code to null 2015-09-11 12:08:23 -07:00
Pranav K bc10a17107 Reacting to DNX changes 2015-09-10 17:51:59 -07:00
Ajay Bhargav Baaskaran 14bdaf2db6 React to aspnet/Razor#485 2015-09-10 17:24:35 -07:00
Pranav K 0350f6ed48 Adding NeutralResourcesLanguageAttribute to Mvc assemblies 2015-09-10 16:17:42 -07:00
N. Taylor Mullen 7cbcbae5e7 Disable test due to mono bug on Mac. 2015-09-10 12:45:31 -07:00
N. Taylor Mullen e04c7c77ed Update `.travis.yml` to run on OSX.
- Added `MONO_THREADS_PER_CPU=2000` and `MONO_MANAGED_WATCHER=disabled` environment variables to ensure `dnu restore` completes successfully.
2015-09-10 12:45:29 -07:00
Kiran Challa 62c0eb3f02 React to errorhandler and errorpage extension name changes 2015-09-10 12:30:16 -07:00
Doug Bunting b705922235 Do not build `TestCommon` project in Visual Studio 2015-09-10 11:55:59 -07:00
Doug Bunting 271e19e61a Remove use of `IsMono` to no-op a test
- 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
2015-09-10 11:55:51 -07:00
Doug Bunting 902e42817d Remove duplicate test data 2015-09-10 11:55:44 -07:00
Pranav K d25d9704f7 Using test setup pattern from aspnet/Stress. 2015-09-10 11:42:30 -07:00
Shannon Deminick 87c15bb6dc Adds/updates some docs for the FromServicesAttribute with examples 2015-09-10 08:03:50 -07:00
Pranav K 2e32ffc004 Use PrecompilationTagHelperTypeResolver to locate TagHelpers during
precompilation.

Fixes #2298
2015-09-09 18:25:11 -07:00
KevinDockx 894574d04e Implement Replace Move and Copy for dynamic objects 2015-09-08 22:09:44 -07:00
Doug Bunting ae57844c6a Make a few arrays explicitly `object[]`
- react to aspnet/aspnet.xunit#13
- latest xUnit bits maintains array types correctly, failing some `Type`-related assertions
  - previous xUnit versions mapped all arrays to `object[]`
  - fix likely part of xunit/xunit@bd6814c
2015-09-08 21:44:32 -07:00
Pranav K 67eb16dc67 Fixing RazorViewEngine formatting 2015-09-08 15:52:53 -07:00
Pranav K 1c8f22058c Make RazorViewEngine.GetNormalizedRouteValue public
Fixes #3108
2015-09-08 15:41:44 -07:00
Ryan Nowak a6aaef0d63 Optimize async code in model binders
Optimize the 'no-op' path for our model binders to return a cached task
where possible without going async.
2015-09-08 09:42:34 -07:00
Ryan Nowak ab08e27a4b Simplify CompositeModelBinder
Also adds a diagnostic ToString to ModelBindingResult to make testing
easier.
2015-09-08 08:47:21 -07:00
Ryan Nowak 382c9ab86a Test Cleanup: Fix Assert.NotNulls with ModelBindingResult 2015-09-07 17:15:31 -07:00
Ryan Nowak 465b4ce0df Use TelemetrySource 2015-09-06 20:23:05 -07:00
David Fowler 2834b70987 Added frameworks to project.json 2015-09-05 11:03:00 -07:00
Doug Bunting dc4573e484 Get four failing tests working on Linux
- 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
2015-09-04 14:41:35 -07:00
Ryan Nowak 5afadf6998 Fix documentation error 2015-09-03 17:11:47 -07:00
N. Taylor Mullen ffc863532a Update end column in test after Razor error changes. 2015-09-03 16:53:52 -07:00
N. Taylor Mullen 9169a156e2 Update additional tests to account for new error lengths. 2015-09-03 15:21:00 -07:00
Ryan Nowak 076ce6a8a1 Make ModelBindingResult a struct. 2015-09-03 12:52:50 -07:00
Hao Kung 2b52942faf React to Named Options going away in Auth test 2015-09-02 21:54:10 -07:00
Hao Kung b34dd3b812 Remove options order test cases 2015-09-02 21:41:54 -07:00
Hao Kung e4fe31a602 Nuke extra curly 2015-09-02 21:21:41 -07:00
Hao Kung a786eaa9e4 Resolve merge issue 2015-09-02 21:10:43 -07:00
Hao Kung 043476192f Disable Options order functional test 2015-09-02 20:53:30 -07:00
Hao Kung 6333c12d77 Fix test websites 2015-09-02 20:11:05 -07:00
Hao Kung 77d9b41e48 Fix merge issue 2015-09-02 17:49:18 -07:00
Hao Kung 76dceaef76 Fix build breaks 2015-09-02 16:22:02 -07:00