Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmf-cli/Commands/new/DataCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ protected override List<string> GenerateArgs(IDirectoryInfo projectRoot, IDirect
"--rootRelativePath", relativePathToRoot,
"--repositoryType", repoType.ToString()
});
args.AddRange(new []{ "--targetFramework", DependencyVersionService.NET6TARGETFRAMEWORK });
args.AddRange(new []{ "--targetFramework", ExecutionContext.ServiceProvider.GetService<IDependencyVersionService>().DotNetTargetFramework(version) });

return args;
}
Expand Down
29 changes: 29 additions & 0 deletions tests/Specs/New.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,35 @@ public void Data()
RunNew(new DataCommand(), "Cmf.Custom.Data");
}

[Fact, Trait("TestCategory", "Integration")]
public void Data_TargetFramework_Net8_For_MES11()
{
RunNew(new DataCommand(), "Cmf.Custom.Data",
extraAsserts: args =>
{
var (_, dir) = args;
var actionsCsproj = Path.Combine(dir, "Cmf.Custom.Data", "DEEs", "Cmf.Custom.tenant.Actions.csproj");
File.Exists(actionsCsproj).Should().BeTrue();
var content = File.ReadAllText(actionsCsproj);
content.Should().Contain("<TargetFramework>net8.0</TargetFramework>");
});
}

[Fact, Trait("TestCategory", "Integration")]
public void Data_TargetFramework_Net6_For_MES10()
{
RunNew(new DataCommand(), "Cmf.Custom.Data",
mesVersion: "10.2.0",
extraAsserts: args =>
{
var (_, dir) = args;
var actionsCsproj = Path.Combine(dir, "Cmf.Custom.Data", "DEEs", "Cmf.Custom.tenant.Actions.csproj");
File.Exists(actionsCsproj).Should().BeTrue();
var content = File.ReadAllText(actionsCsproj);
content.Should().Contain("<TargetFramework>net6.0</TargetFramework>");
});
}

[Fact, Trait("TestCategory", "LongRunning"), Trait("TestCategory", "Integration")]
public void Data_WithBusiness()
{
Expand Down
Loading