Commit Graph

183 Commits

Author SHA1 Message Date
N. Taylor Mullen 83faaebdb6 Upgrade Roslyn dependency to 2.0.0.
- Added C# 7 unit and functional test to validate features work end-to-end.

#6149
2017-04-21 11:41:31 -07:00
Pranav K 681b798a2e RedirectToPage doesn't trim /Index from URL
Fixes #6080
2017-04-20 11:15:45 -07:00
Ryan Nowak 4bf518b09b Fix #6140 - Allow linking between controller and page
The issue here is that route values used for action selection are
'global'. That means that pages need to have a 'null' route value for
'action' and controllers need to have a 'null' route value for pages. This
is the same way that areas work.

The fix is to move the 'merge' of route values up to a level where pages
and controllers can work together. Since ADPs use the russian-doll
pattern, the fix is to run this 'merge' in the controller ADP, but after
all of the ADs have been created.
2017-04-19 16:48:38 -07:00
Ryan Brandenburg c9bfd2296d Parity between Controller and Page/PageModel 2017-04-19 15:02:06 -07:00
Ryan Nowak a8eb5bee70 Implement view search for pages
The View Engine now needs to know about pages :(. This isn't ideal but the
view engine needs to know what set of search paths to use. This was
already hardcoded for controllers vs controllers + areas. It felt right to
further hardcode instead of introduce a wierd abstraction that we only
use.

Additionally pages use a view location expander to implement an ascending
directory search.
2017-04-18 16:11:24 -07:00
Pranav K 8fa95d66d4 Add support for suppressing inbound and outbound routing 2017-04-14 17:02:45 -07:00
Ryan Nowak ed3aa4d918 Adding functional tests for @namespace 2017-04-14 14:47:29 -07:00
Jass Bagga 3eae7cc393 Add AggregateExceptionTest (#6135)
Test for aspnet/Common#215
2017-04-14 14:20:31 -07:00
Pranav K 3474bdf776 RedirectToPage from a form-action handler includes the formaction
Fixes #6104
2017-04-12 09:27:08 -07:00
Kiran Challa 106b34867d Temporarily skipping ErrorPageMiddleware functional test to unblock mirror 2017-04-11 17:40:01 -07:00
Ryan Brandenburg 59a3aade9b Fix [TempData] for PageModel's 2017-04-11 16:45:44 -07:00
Steve Sanderson 90acd055fe Make [FromBody] treat empty request bodies as invalid (#4750) 2017-04-10 16:55:14 +01:00
Pranav K 1e7972bd8f Add convenience methods for redirecting from a Razor Page back to itself
Fuxes #5953
2017-04-07 10:03:42 -07:00
Ryan Nowak 4032de064e Removing _PageStart.cshtml
Pages now also use _ViewStart.cshtml

Also contains some naming/text cleanup that was missed in the previous
commit.
2017-04-06 08:14:37 -07:00
Ajay Bhargav Baaskaran 3424e20c67 Re-enable skipped test 2017-04-04 19:25:50 -07:00
Pranav K 925ad75cdf Add convenience methods for redirecting to another Razor Page
Fixes #5956
2017-04-04 14:36:22 -07:00
Ryan Brandenburg e5ccac8bf6 Add functional tests for RazorPage routes 2017-04-04 11:14:52 -07:00
Ajay Bhargav Baaskaran 3ab9feca3a Temporarily skipping failing test 2017-04-03 23:24:09 -07:00
Hisham Bin Ateya fe3d45fad1 Adding AllowAnonymousToPage & AllowAnonymousToFolder
Fixes #5884
2017-03-31 20:17:31 -07:00
Steve Sanderson 4f351bd37c Add support for media type suffixes (#5273, #6032) 2017-03-31 10:20:43 +01:00
Doug Bunting 1672820e4e Add functional test covering an `IList<T>` property
- #5656
2017-03-29 12:32:06 -07:00
Jass Bagga eda5028cf4 Add TagHelperComponentTagHelper
Addresses #5728
2017-03-29 11:29:24 -07:00
Pranav K b22326323a Add properties to Page and PageModel
Fixes #6008
2017-03-28 13:26:38 -07:00
Pranav K e7101f248a Support model binding to Razor Pages properties on page and PageModel classes
Fixes #5952
2017-03-24 07:45:19 -07:00
Pranav K badb6ce8e5 Remove net451 as a cross-compile target 2017-03-22 06:32:50 -07:00
Ryan Brandenburg e6cb639cc0 Add handler functional test 2017-03-20 10:05:29 -07:00
Jass Bagga 1197657e5b TempData property attribute
Addresses #5600
2017-03-16 16:34:35 -07:00
Nate McMaster 6f7717a381 Unify dependency versions to one file 2017-03-15 16:54:32 -07:00
Pranav K bee1a55cff Use RazorPagesOptions.RootDirectory when looking for page hierarchies.
Fixes #5915
2017-03-14 18:56:50 -07:00
Ryan Brandenburg 82d87df166 Fix warning as error 2017-03-14 12:44:57 -07:00
Ryan Brandenburg 365ae19c8b Add InvalidTagHelperIndexerAssignment to RazorPageBase 2017-03-14 10:04:15 -07:00
Ryan Brandenburg 1c74e31715 Add tests for PageActionInvokerProvider (#5882) 2017-03-09 16:19:20 -08:00
Ryan Brandenburg 7f3f6957be Set path in DefaultPageFactory (#5911) 2017-03-09 16:15:43 -08:00
Ryan Brandenburg d9d280d1ef Make CookieTempDataProvider the default ITempDataProvider (#5892) 2017-03-07 16:04:47 -08:00
Ryan Brandenburg 4a20c849cb Add functional test for Page.View() (#5896) 2017-03-06 16:19:41 -08:00
Doug Bunting 5c96a7cdef Use an alternate workaround for #5873
- use specific workaround for Microsoft/vstest#428
  - generating an executable for a test project is a bit too weird
- also work around dotnet/sdk#926
  - generating an executable covered this as well

nit: add and update comments about other workarounds in the functional tests project
2017-03-06 14:05:21 -08:00
Pranav K 145d27f9b3 Add a PagesOption type that allows configuring the root for Page file discovery
Fixes #5785
2017-03-03 17:20:07 -08:00
Ryan Brandenburg 85e28ae478 Trim quotes from template (#5838) 2017-03-03 09:52:36 -08:00
Pranav K 7cadb58e12 Add convenience extension methods for IPageApplicationModelConvention 2017-03-02 17:38:04 -08:00
Doug Bunting 9b3b3e91bd Re-enable functional tests on full .NET Framework
- #5873
- creating an EXE for the test project seems to work around #5873
  - also avoids dotnet/sdk#926 when building in Visual Studio

nit: clean up duplicate test data
2017-03-01 23:08:46 -08:00
N. Taylor Mullen acfad83aa6 Migrate to MSBuild
- thanx to @NTaylorMullen for initial conversion
  - e.g. AssemblyInfo.cs files were already minimized or removed :)
- allow `>=` RC3 CLI's to build and run MVC
- work around several dotnet migration issues; see #5482
- disable full .NET Framework runs of functional tests; see #5873
- remove `Microsoft.DotNet.InternalAbstractions` and `System.Xml.XmlDocument` dependencies
- remove project.json (!!), *.xproj, .notest, and web.config files

Redo earlier changes:
- apply test migration to .NET 4.5.2 in *.csproj world
  - see 63507c8 for previous, project.json work
- apply dependency version downgrade from 0097e40 in *.csproj world

Make other test-related changes:
- make Microsoft.AspNetCore.Mvc.TestDiagnosticListener a regular class library
- add support for `/p:GenerateBaselines=true` for functional and Razor.Host tests
- separate `GetCSharpTypeName_ReturnsCorrectTypeNames_ForOutParameter()` test
  - work around inability to deserialize a odd `ref` type
  - xUnit and vstest now serialize / deserialze test data more often
- skip poor test mentioned in #5768
- work around Microsoft/vstest#392
  - rename tests to avoid duplicates
- work around Microsoft/vstest#419
  - set up created `AppDomain`s with current `ApplicationBase`
2017-02-28 21:20:39 -08:00
martincostello 498c1c570d Update error message
Update error message based on PR feedback to less C# specific.
2017-02-23 14:21:58 -08:00
martincostello 9950325269 Update view compilation error message
Update view compilation error message for csproj instead of
project.json.
2017-02-23 14:21:58 -08:00
Ryan Nowak e11e6b3be7 Add TempData property and some functional tests 2017-02-22 08:14:02 -08:00
Ajay Bhargav Baaskaran ed9025cc5b React to aspnet/Razor#1030 - Enable skipped test 2017-02-21 17:32:44 -08:00
Ryan Nowak 19331f9532 Adding some basic functional tests
I ran into a blocking issue where page handlers aren't picked up, so I
fixed it. Logging another issue to follow up with better tests for this.
2017-02-21 16:41:25 -08:00
Ryan Nowak 36e4dbe941 Adding a functional test project for Razor Pages 2017-02-21 08:25:30 -08:00
Doug Bunting 63507c8da9 Bump test projects up to .NET 4.5.2
- aspnet/Testing#248
- xUnit no longer supports .NET 4.5.1
- update AppVeyor config so this framework version is available
- build tests for desktop .NET only on Windows
2017-02-21 07:15:36 -08:00
Nate McMaster 0097e40e46 Downgrade to stable packages 2017-02-15 14:23:48 -08:00
Pranav K f474d8bc52 React to optional Razor directive token feature 2017-02-07 21:58:31 -08:00