Commit Graph

573 Commits

Author SHA1 Message Date
Pranav K ba5712c824 Merge branch 'release' into dev 2014-12-12 16:56:54 -08:00
DamianEdwards 263e75c8a6 Update tests for Razor Tag Helpers Unique ID feature:
- aspnet/razor#241
2014-12-12 16:27:41 -08:00
Pranav K edc2c2d18c Removing transitive references from aspnetcore50 to unblock build 2014-12-12 12:53:27 -08:00
Doug Bunting 3e26142de1 Remove use of `Assert.DoesNotThrow()`
- no longer in xunit 😃
2014-12-11 15:51:15 -08:00
Praburaj 3dfcc884fe Changes to address IFileSystem.Watch method addition
Absorbs the new IFileSystem interface. This change is to just address the breaking change introduced in IFileSystem.
Razor has to do the necessary changes to subscribe to the Watch event for expiring the modified files.
2014-12-11 10:00:46 -08:00
Ryan Nowak 09b01d8f32 update comment about precompilation (cr feedback) 2014-12-11 09:41:52 -08:00
Ryan Nowak c6bc97afbf Update precompilation to use the library manager instead of relative
paths.

This website is written to assume that $pwd is always in the functional
tests directory when it's launched. This works fine for the functional
tests, but causes issues in many other contexts, including VS.
2014-12-11 09:31:38 -08:00
Ryan Nowak f338f70e06 Update WebAPI shim functional tests to use a header for payload
The issue is that responses to HEAD cannot have a body. When running these
tests on a real server, they break because the server throws when you try
to write to the body.
2014-12-11 09:18:05 -08:00
Ryan Nowak b4975b779c Update names of WebSite projects for consistency
Project/Assembly names are all like 'FeatureWebSite' root namespaces
updated accordingly. This makes processing all of the functional tests and
deploying the web sites much simpler.
2014-12-11 09:10:24 -08:00
Ryan Nowak e65218d6df Adding servers and wwwroot folder to test websites
Adding dependencies and commands for iis, web listener and khestrel to each
site.

Each website comes with a readme.md to 'anchor' the otherwise empty
folder. We have another work item tracking adding content to these.

Once VS sees a project with a wwwroot, it wants to assign a port for iis,
so I let it.
2014-12-10 14:16:11 -08:00
Ryan Nowak 1631ca1a47 Fix for #1681 - Model state errors are wrong with attributes like [FromHeader]
The issue here is that a model state error is added with the model name
'doubled'. This is on a fairly obscure code path and the code dates back
to the original WSR git checkin of webapi. There are no wsr tests that
verify this behavior.

The cause here is that our 'greedy' model binders (like
FromHeaderModelBinder) return 'true' whether or not they successfully
found a model, because they don't want other model binders to run.

This also has an effect on the validation system. That means that
validators will run and attempt to validate the model (which may be null).
That's that rare case where we get to this code path.
2014-12-10 14:03:51 -08:00
Ryan Nowak 9468d741ee Fix for #1671 - Adding [FromHeader] attribute 2014-12-08 11:42:57 -08:00
Harsh Gupta d7094fd32d Adding Support for TryUpdateModel using include expressions and predicate. 2014-12-05 17:28:43 -08:00
Ryan Nowak ca714c5149 CR feedback from [ModelBinderAttribute] 2014-12-05 16:10:07 -08:00
Doug Bunting f94bd53464 Add functional test of MVC tag helper sample
- ensure future changes don't break this sample
2014-12-05 15:48:43 -08:00
Doug Bunting 27beca7738 Fix #1618, Add asp- prefix to custom attributes of MVC tag helpers
- update XML docs to reflect new HTML / custom attribute separation
- update `Exception` messages to use new attribute names
- update MVC tag helper sample to use new custom attribute names
- add missing `<input/>` tag helper `throw`s test

nits:
- reword a few comments and messages for clarity and consistency
- use `<exception/>` sections to describe what's thrown
- add "Reviewers" comments about current throws
 - note `<a/>` and `<form/>` are slightly inconsistent with others: `throw`
   if unable to override specified `href` or `action` attributes; rest
   `throw` only if custom attributes are inconsistent e.g. `<input/>` with
   `asp-format` but no `asp-for`
- create test tag helpers after all property values are available
2014-12-05 15:48:33 -08:00
N. Taylor Mullen b666cce854 Reacted to aspnet/Razor#215 changes. 2014-12-05 15:31:35 -08:00
Pranav K 6ec85baa22 Fixing build break
Change the casing of _ViewStart.cshtml to match the expected case.
2014-12-05 15:16:27 -08:00
Kirthi Krishnamraju d8455c3e64 Make Flush work without requiring curly braces
Fixes #1547
2014-12-05 14:53:09 -08:00
Pranav K 275d03a958 Compilation of Views should be affected by changes to _ViewStart files
that are applicable to the view.

Fixes #974
2014-12-05 14:44:36 -08:00
ianhong 5b1eae494e Update templates\samples\tests to use ensure viewstart.cshtml and views directory names are cased appropriately. #1559 2014-12-05 13:27:22 -08:00
Ryan Nowak 00ce7dcfcc Fix build break 2014-12-05 12:24:19 -08:00
Harsh Gupta e9bcc3f0e8 Adding support for ModelMetadataAttribute in core. 2014-12-05 12:00:19 -08:00
Mugdha Kulkarni ba8cf3ca46 Changed to use OptionalRouteConstraint created by Routing to use for inline optional parameters in attribute routing. Also added tests for inline parameters. 2014-12-04 11:00:48 -08:00
Kiran Challa 00b61ec1e6 [Partial fix for #1372]Added SimpleTypesExcludeFilter to exlcude validation on simple types and also added tests to cover scenarios. 2014-12-03 14:09:51 -08:00
Victor Hurdugaci d788e87a94 React to DI changes part 2 2014-12-03 13:36:54 -08:00
Victor Hurdugaci dbdf2e66ba Update message from DI exception 2014-12-03 13:09:44 -08:00
Pranav K 7b20909a60 Revert changs to Flush point tests made as part of 4ad3e9
This should resolve timing issues that are currently being seen.
2014-12-03 12:56:14 -08:00
Victor Hurdugaci 91549e15a5 React to DI changes 2014-12-03 12:09:31 -08:00
Pranav K 933f7eeb22 Layout specification and discovery should follow the same behavior as
partials

Fixes #1047
2014-12-03 11:54:46 -08:00
Pranav K 765f113515 Checkin VS auto-modifications to kproj files 2014-12-03 11:11:43 -08:00
Praburaj cfd5630cf2 Addressing breaking IFileSystem changes
@pranavkm
2014-12-02 15:58:05 -08:00
Ryan Nowak 0152aac7f4 Fix for #1652 - Make Authorization Filters run first
This change moves authorization filters to be the first filter stage
(before exception filters).
2014-12-02 10:39:50 -08:00
Harsh Gupta 2353bd911a Adding Support for TryUpdateModel using include expressions and predicate. 2014-11-26 17:44:50 -08:00
Harsh Gupta b54c326ee6 Updating Associated Metadata Provider to follow the existing pattern. 2014-11-26 16:56:32 -08:00
Ryan Nowak 8ce069f56a [Fixes #393] [Design] Update ViewComponent result apis to be consistent with Controller
1. Updated ViewComponent to exposes similar properties to the existing ones in controller where
appropiate. We've left out Resolver for being a bad pattern (just inject the dependency on the constructor
or use Context.RequestServices to access it if needed) and Response as although available through the Context
property, it shouldn't be used/modified in a ViewComponent.

2. Updated ViewViewComponentResult to follow a similar pattern as ViewResult where the constructor is
parameterless and elements like ViewEngine are resolved during execution if the user does not set the
associated property on the object.

3. Updated ExecuteAsync in JsonViewComponentResult to remove the unnecessary pragma and async keyword from the
signature and to use Task.FromResult(true) instead.

4. Cleaned up ViewViewComponentResult tests.
2014-11-26 15:56:06 -08:00
Harsh Gupta d2aff42e25 Adding FromServicesAttribute. 2014-11-26 15:35:08 -08:00
Ryan Nowak ff3282827a Fix a test based on the resolution of #1609
This old test (from WSR) was commented out pending the resolution of
issue #1609.

I've updated the test to track the current semantics.
2014-11-26 11:48:01 -08:00
Yishai Galatzer 2eef4dd3cf Remove ControllerDescriptor and fix ControllerActionDescriptor to pick the right type for the display name. 2014-11-25 13:54:57 -08:00
Ajay Bhargav Baaskaran 9f1cb655f6 matched classnames with filenames 2014-11-25 11:21:17 -08:00
Victor Hurdugaci 99b5f430ff Add schema version to kproj files 2014-11-25 10:57:58 -08:00
Harsh Gupta d00c7ef597 Adding support for property level binding using IBinderMetadata and enabling FromXXX attributes to be decorated on properties. 2014-11-24 21:33:02 -08:00
Doug Bunting 823229279a Extend MVC Sample functional test to include all Home views 2014-11-22 10:36:46 -08:00
Ryan Nowak e54bf866e0 Simplifying InlineConstraints tests
Right now these use a commandline adapter to inject some data into the
tests, but it's really not needed. Instead, these routes use a prefix to
ensure that the scenario under test is isolated.
2014-11-21 11:28:44 -08:00
Pranav K ba1d66d683 Fixing build break 2014-11-21 09:40:02 -08:00
Pranav K 0e4ec38efe Replacing Assert.Equal(null, Assert.Equal(true \ false etc with
appropriate Xunit equivalents
2014-11-21 08:28:55 -08:00
Doug Bunting 7eb106676c Add missing license headers
- #EngineeringDay
- license present but incorrect in just a few files
- skip generated files such as Resources.Designer.cs and files under
  test\Microsoft.AspNet.Mvc.Razor.Host.Test\TestFiles\Output
2014-11-20 22:54:05 -08:00
Doug Bunting 315908af5f Apply VS' FormatDocument and RemoveAndSort to all *.cs files
- #EngineeringDay
- VS does not yet format auto-properties nicely; reverted what it did

Also revert changes under
- test/Microsoft.AspNet.Mvc.Razor.Host.Test/TestFiles
2014-11-20 21:15:46 -08:00
Ryan Nowak eb6598e1b9 Fix flaky NoContentFormatter test 2014-11-20 17:48:00 -08:00
Hao Kung d9893b260a React to fallback changes 2014-11-20 17:43:55 -08:00