Skip to content

Commit c2f0331

Browse files
authored
Include project file in F# Worker Service template (#25180)
- add test of this project template
1 parent b0530a6 commit c2f0331

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/ProjectTemplates/Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
<GeneratedContent Include="WebApi-CSharp.csproj.in" OutputPath="content/WebApi-CSharp/Company.WebApplication1.csproj" />
6060
<GeneratedContent Include="WebApi-FSharp.fsproj.in" OutputPath="content/WebApi-FSharp/Company.WebApplication1.fsproj" />
6161
<GeneratedContent Include="Worker-CSharp.csproj.in" OutputPath="content/Worker-CSharp/Company.Application1.csproj" />
62+
<GeneratedContent Include="Worker-FSharp.fsproj.in" OutputPath="content/Worker-FSharp/Company.Application1.fsproj" />
6263
<GeneratedContent Include="ComponentsWebAssembly-CSharp.Client.csproj.in" OutputPath="content/ComponentsWebAssembly-CSharp/Client/ComponentsWebAssembly-CSharp.Client.csproj" />
6364
<GeneratedContent Include="ComponentsWebAssembly-CSharp.Shared.csproj.in" OutputPath="content/ComponentsWebAssembly-CSharp/Shared/ComponentsWebAssembly-CSharp.Shared.csproj" />
6465
<GeneratedContent Include="ComponentsWebAssembly-CSharp.Server.csproj.in" OutputPath="content/ComponentsWebAssembly-CSharp/Server/ComponentsWebAssembly-CSharp.Server.csproj" />

src/ProjectTemplates/test/WorkerTemplateTest.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,17 @@ public WorkerTemplateTest(ProjectFactoryFixture projectFactory, ITestOutputHelpe
2121
public ProjectFactoryFixture ProjectFactory { get; }
2222
public ITestOutputHelper Output { get; }
2323

24-
[ConditionalFact]
24+
[ConditionalTheory]
2525
[OSSkipCondition(OperatingSystems.Linux, SkipReason = "https://github.com/dotnet/sdk/issues/12831")]
26-
public async Task WorkerTemplateAsync()
26+
[InlineData("C#")]
27+
[InlineData("F#")]
28+
public async Task WorkerTemplateAsync(string language)
2729
{
28-
Project = await ProjectFactory.GetOrCreateProject("worker", Output);
30+
Project = await ProjectFactory.GetOrCreateProject(
31+
$"worker-{ language.ToLowerInvariant()[0] }sharp",
32+
Output);
2933

30-
var createResult = await Project.RunDotNetNewAsync("worker");
34+
var createResult = await Project.RunDotNetNewAsync("worker", language: language);
3135
Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create/restore", Project, createResult));
3236

3337
var publishResult = await Project.RunDotNetPublishAsync();

0 commit comments

Comments
 (0)