From d686acad871fccda5e3bae19d02db4db22e99501 Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Sat, 13 Jan 2018 18:24:50 -0800 Subject: [PATCH] Avoid use of AssemblyQualifiedName in tests The type name generated by Razor is an implementation detail and shouldn't be used in tests outside of the Razor repo. Testing that the assembly name is correct should be enough to validate what we need for these tests. --- ...ApplicationConsumingPrecompiledViews.Manage.Home.Index.txt | 2 +- .../Resources/ApplicationUsingRelativePaths.Home.About.txt | 2 +- .../Resources/ApplicationUsingRelativePaths.Home.Index.txt | 2 +- .../Resources/ApplicationWithConfigureMvc.Home.Index.txt | 2 +- .../ApplicationWithTagHelpers.Home.ClassLibraryTagHelper.txt | 4 ++-- .../ApplicationWithTagHelpers.Home.LocalTagHelper.txt | 4 ++-- test/FunctionalTests/Resources/SimpleAppTest.Home.Index.txt | 4 ++-- .../Resources/SimpleAppWithAssemblyRenameTest.Home.Index.txt | 2 +- test/FunctionalTests/Resources/StrongNamedApp.Home.Index.txt | 2 +- .../ApplicationUsingRelativePaths/Views/Home/Index.cshtml | 2 +- testapps/ApplicationWithConfigureMvc/Views/Home/Index.cshtml | 2 +- .../Views/Home/ClassLibraryTagHelper.cshtml | 2 +- .../Views/Home/LocalTagHelper.cshtml | 2 +- .../ApplicationWithTagHelpers/Views/Shared/_Layout.cshtml | 2 +- .../Areas/Manage/Views/Shared/_Layout.cshtml | 2 +- testapps/SimpleApp/Views/Home/Index.cshtml | 2 +- testapps/SimpleApp/Views/Shared/_Layout.cshtml | 2 +- testapps/SimpleAppWithAssemblyRename/Views/Home/Index.cshtml | 2 +- testapps/StrongNamedApp/Views/Home/Index.cshtml | 2 +- 19 files changed, 22 insertions(+), 22 deletions(-) diff --git a/test/FunctionalTests/Resources/ApplicationConsumingPrecompiledViews.Manage.Home.Index.txt b/test/FunctionalTests/Resources/ApplicationConsumingPrecompiledViews.Manage.Home.Index.txt index a0e0cd1b3b..e4baad155e 100644 --- a/test/FunctionalTests/Resources/ApplicationConsumingPrecompiledViews.Manage.Home.Index.txt +++ b/test/FunctionalTests/Resources/ApplicationConsumingPrecompiledViews.Manage.Home.Index.txt @@ -1,7 +1,7 @@ - AspNetCore._Areas_Manage_Views_Shared__Layout_cshtml, ClassLibraryWithPrecompiledViews.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + ClassLibraryWithPrecompiledViews.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

Admin home page

diff --git a/test/FunctionalTests/Resources/ApplicationUsingRelativePaths.Home.About.txt b/test/FunctionalTests/Resources/ApplicationUsingRelativePaths.Home.About.txt index 29277b2c98..c3b073162c 100644 --- a/test/FunctionalTests/Resources/ApplicationUsingRelativePaths.Home.About.txt +++ b/test/FunctionalTests/Resources/ApplicationUsingRelativePaths.Home.About.txt @@ -2,7 +2,7 @@ -AspNetCore._Views_Home_Index_cshtml, ApplicationUsingRelativePaths.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null +ApplicationUsingRelativePaths.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Hello from Index! \ No newline at end of file diff --git a/test/FunctionalTests/Resources/ApplicationUsingRelativePaths.Home.Index.txt b/test/FunctionalTests/Resources/ApplicationUsingRelativePaths.Home.Index.txt index 29277b2c98..c3b073162c 100644 --- a/test/FunctionalTests/Resources/ApplicationUsingRelativePaths.Home.Index.txt +++ b/test/FunctionalTests/Resources/ApplicationUsingRelativePaths.Home.Index.txt @@ -2,7 +2,7 @@ -AspNetCore._Views_Home_Index_cshtml, ApplicationUsingRelativePaths.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null +ApplicationUsingRelativePaths.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Hello from Index! \ No newline at end of file diff --git a/test/FunctionalTests/Resources/ApplicationWithConfigureMvc.Home.Index.txt b/test/FunctionalTests/Resources/ApplicationWithConfigureMvc.Home.Index.txt index 8d6a706cbd..6ed3f16836 100644 --- a/test/FunctionalTests/Resources/ApplicationWithConfigureMvc.Home.Index.txt +++ b/test/FunctionalTests/Resources/ApplicationWithConfigureMvc.Home.Index.txt @@ -1,2 +1,2 @@ -AspNetCore._Views_Home_Index_cshtml, ApplicationWithConfigureMvc.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null +ApplicationWithConfigureMvc.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Hello world! \ No newline at end of file diff --git a/test/FunctionalTests/Resources/ApplicationWithTagHelpers.Home.ClassLibraryTagHelper.txt b/test/FunctionalTests/Resources/ApplicationWithTagHelpers.Home.ClassLibraryTagHelper.txt index 9e1587d4bb..f3a28a4d23 100644 --- a/test/FunctionalTests/Resources/ApplicationWithTagHelpers.Home.ClassLibraryTagHelper.txt +++ b/test/FunctionalTests/Resources/ApplicationWithTagHelpers.Home.ClassLibraryTagHelper.txt @@ -8,7 +8,7 @@
-AspNetCore._Views_Home_ClassLibraryTagHelper_cshtml, ApplicationWithTagHelpers.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null +ApplicationWithTagHelpers.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
To boldy tag that no one has ever tagged before...
@@ -20,6 +20,6 @@ AspNetCore._Views_Home_ClassLibraryTagHelper_cshtml, ApplicationWithTagHelpers.P
- AspNetCore._Views_Shared__Layout_cshtml, ApplicationWithTagHelpers.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + ApplicationWithTagHelpers.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null diff --git a/test/FunctionalTests/Resources/ApplicationWithTagHelpers.Home.LocalTagHelper.txt b/test/FunctionalTests/Resources/ApplicationWithTagHelpers.Home.LocalTagHelper.txt index cda9d510a9..43afc098bd 100644 --- a/test/FunctionalTests/Resources/ApplicationWithTagHelpers.Home.LocalTagHelper.txt +++ b/test/FunctionalTests/Resources/ApplicationWithTagHelpers.Home.LocalTagHelper.txt @@ -8,7 +8,7 @@
-AspNetCore._Views_Home_LocalTagHelper_cshtml, ApplicationWithTagHelpers.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null +ApplicationWithTagHelpers.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null TestTagHelper content. @@ -20,6 +20,6 @@ AspNetCore._Views_Home_LocalTagHelper_cshtml, ApplicationWithTagHelpers.Precompi
- AspNetCore._Views_Shared__Layout_cshtml, ApplicationWithTagHelpers.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + ApplicationWithTagHelpers.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null diff --git a/test/FunctionalTests/Resources/SimpleAppTest.Home.Index.txt b/test/FunctionalTests/Resources/SimpleAppTest.Home.Index.txt index 620d2a25d0..afba35a9ea 100644 --- a/test/FunctionalTests/Resources/SimpleAppTest.Home.Index.txt +++ b/test/FunctionalTests/Resources/SimpleAppTest.Home.Index.txt @@ -35,7 +35,7 @@
-AspNetCore._Views_Home_Index_cshtml, SimpleApp.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null +SimpleApp.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null @RenderSection("scripts", required: false) - @GetType().AssemblyQualifiedName + @GetType().Assembly.FullName diff --git a/testapps/ClassLibraryWithPrecompiledViews/Areas/Manage/Views/Shared/_Layout.cshtml b/testapps/ClassLibraryWithPrecompiledViews/Areas/Manage/Views/Shared/_Layout.cshtml index 6578e0e81c..821a366557 100644 --- a/testapps/ClassLibraryWithPrecompiledViews/Areas/Manage/Views/Shared/_Layout.cshtml +++ b/testapps/ClassLibraryWithPrecompiledViews/Areas/Manage/Views/Shared/_Layout.cshtml @@ -1,7 +1,7 @@  - @GetType().AssemblyQualifiedName + @GetType().Assembly.FullName @RenderBody() @RenderSection("TestSection") diff --git a/testapps/SimpleApp/Views/Home/Index.cshtml b/testapps/SimpleApp/Views/Home/Index.cshtml index de297ae049..e6b0e16e90 100644 --- a/testapps/SimpleApp/Views/Home/Index.cshtml +++ b/testapps/SimpleApp/Views/Home/Index.cshtml @@ -2,7 +2,7 @@ ViewData["Title"] = "Home Page"; } -@GetType().AssemblyQualifiedName +@GetType().Assembly.FullName