Integrate new WebSDK
One of these tests had to be updated and split into two because the expectations of the test weren't totally right. I also logged https://github.com/aspnet/Razor/issues/1986 during this, we didn't consider the impact of putting this logic in the WebSDK on class library.
This commit is contained in:
parent
3e449ec3de
commit
02200d4c11
|
|
@ -74,14 +74,28 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
Assert.FileCountEquals(result, 0, Path.Combine(PublishOutputPath, "Views"), "*.cshtml");
|
Assert.FileCountEquals(result, 0, Path.Combine(PublishOutputPath, "Views"), "*.cshtml");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact] // This will use the old precompilation tool, RazorSDK shouldn't get involved.
|
||||||
[InitializeTestProject("SimpleMvc")]
|
[InitializeTestProject("SimpleMvc")]
|
||||||
public async Task Publish_WithMvcRazorCompileOnPublish_PublishesAssembly()
|
public async Task Publish_WithMvcRazorCompileOnPublish_Noops()
|
||||||
{
|
{
|
||||||
var result = await DotnetMSBuild("Publish", "/p:MvcRazorCompileOnPublish=true");
|
var result = await DotnetMSBuild("Publish", "/p:MvcRazorCompileOnPublish=true");
|
||||||
|
|
||||||
Assert.BuildPassed(result);
|
Assert.BuildPassed(result);
|
||||||
|
|
||||||
|
Assert.FileExists(result, PublishOutputPath, "SimpleMvc.dll");
|
||||||
|
Assert.FileExists(result, PublishOutputPath, "SimpleMvc.pdb");
|
||||||
|
Assert.FileDoesNotExist(result, PublishOutputPath, "SimpleMvc.PrecompiledViews.dll");
|
||||||
|
Assert.FileDoesNotExist(result, PublishOutputPath, "SimpleMvc.PrecompiledViews.pdb");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact] // This is an override to force the new toolset
|
||||||
|
[InitializeTestProject("SimpleMvc")]
|
||||||
|
public async Task Publish_WithMvcRazorCompileOnPublish_AndRazorSDK_PublishesAssembly()
|
||||||
|
{
|
||||||
|
var result = await DotnetMSBuild("Publish", "/p:MvcRazorCompileOnPublish=true /p:ResolvedRazorCompileToolset=RazorSDK");
|
||||||
|
|
||||||
|
Assert.BuildPassed(result);
|
||||||
|
|
||||||
Assert.FileDoesNotExist(result, OutputPath, "SimpleMvc.PrecompiledViews.dll");
|
Assert.FileDoesNotExist(result, OutputPath, "SimpleMvc.PrecompiledViews.dll");
|
||||||
Assert.FileDoesNotExist(result, OutputPath, "SimpleMvc.PrecompiledViews.pdb");
|
Assert.FileDoesNotExist(result, OutputPath, "SimpleMvc.PrecompiledViews.pdb");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
|
|
||||||
<!-- Workaround until we get a new SDK build -->
|
|
||||||
<ResolvedRazorCompileToolset Condition="'$(RazorCompileToolset)'==''">RazorSDK</ResolvedRazorCompileToolset>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Test Placeholder -->
|
<!-- Test Placeholder -->
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
|
|
||||||
<!-- Workaround until we get a new SDK build -->
|
<!-- This is needed without a reference to the Web SDK. See: #1986 -->
|
||||||
<ResolvedRazorCompileToolset Condition="'$(RazorCompileToolset)'==''">RazorSDK</ResolvedRazorCompileToolset>
|
<ResolvedRazorCompileToolset>RazorSDK</ResolvedRazorCompileToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Test Placeholder -->
|
<!-- Test Placeholder -->
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
|
|
||||||
<!-- Workaround until we get a new SDK build -->
|
|
||||||
<ResolvedRazorCompileToolset Condition="'$(RazorCompileToolset)'==''">RazorSDK</ResolvedRazorCompileToolset>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Test Placeholder -->
|
<!-- Test Placeholder -->
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
|
|
||||||
<!-- Workaround until we get a new SDK build -->
|
|
||||||
<ResolvedRazorCompileToolset Condition="'$(RazorCompileToolset)'==''">RazorSDK</ResolvedRazorCompileToolset>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Test Placeholder -->
|
<!-- Test Placeholder -->
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue