Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,26 @@ CSharpSyntaxNode MainMenu(CSharpSyntaxNode root) => root.Descendants<MethodDecla
if (projectInfo.TemplateType == TemplateType.Application)
{
string usingForAppText = TextGenerator.GenerateByTemplateName(templateDir, "MenuContributor_UsingForApp", model);
string configureMainMenuText = TextGenerator.GenerateByTemplateName(templateDir, "MenuContributor_ConfigureMainMenu", model);

builders.Add(
new InsertionBuilder<CSharpSyntaxNode>(
root => 2,
usingForAppText,
modifyCondition: root => root.NotContains(usingForAppText)
));
builders.Add(
new ReplacementBuilder<CSharpSyntaxNode>(
root => MainMenu(root).GetStartLine(),
root => MainMenu(root).GetStartLine(),
configureMainMenuText,
modifyCondition: root => root.NotContains(configureMainMenuText)
));
builders.Add(new DeletionBuilder<CSharpSyntaxNode>(
root => MainMenu(root).GetEndLine() - 1,
root => MainMenu(root).GetEndLine() - 1,
modifyCondition: root => !root.NotContains("return Task.CompletedTask;")
));
builders.Add(
new InsertionBuilder<CSharpSyntaxNode>(
root => MainMenu(root).GetEndLine(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using Shouldly;
using System.Threading.Tasks;
using Volo.Abp.Modularity;
using Xunit;

namespace {{ EntityInfo.Namespace }};

public class {{ EntityInfo.Name }}AppServiceTests : {{ ProjectInfo.Name }}ApplicationTestBase
public abstract class {{ EntityInfo.Name }}AppServiceTests<TStartupModule> : {{ ProjectInfo.Name }}ApplicationTestBase<TStartupModule>
where TStartupModule : IAbpModule
{
private readonly I{{ EntityInfo.Name }}AppService _{{ EntityInfo.Name | abp.camel_case }}AppService;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System.Threading.Tasks;
using Shouldly;
using Volo.Abp.Modularity;
using Xunit;

namespace {{ EntityInfo.Namespace }};

public class {{ EntityInfo.Name }}DomainTests : {{ ProjectInfo.Name }}DomainTestBase
public abstract class {{ EntityInfo.Name }}DomainTests<TStartupModule> : {{ ProjectInfo.Name }}TestBase<TStartupModule>
where TStartupModule : IAbpModule
{
public {{ EntityInfo.Name }}DomainTests()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ public static IActivityBuilder AddMigrationAndUpdateDatabaseWorkflow(this IOutco
.AddConfigureMigrationProjectsWorkflow(ActivityNames.AddMigration)
/* Add migration */
.Then<RunCommandStep>(
step => step.Command = new JavaScriptExpression<string>("`dotnet ef migrations add Added${EntityInfo.Name} -p \"${MigrationProjectFile}\" -s \"${StartupProjectFile}\"`")
step => step.Command = new JavaScriptExpression<string>("`dotnet ef migrations add Added${EntityInfo.Name} -p \"${MigrationProjectFile}\"`")
).WithName(ActivityNames.AddMigration)
/* Update database */
.Then<RunCommandStep>(
step => step.Command = new JavaScriptExpression<string>("`dotnet ef database update -p \"${MigrationProjectFile}\" -s \"${StartupProjectFile}\"`")
step => step.Command = new JavaScriptExpression<string>("`dotnet ef database update -p \"${MigrationProjectFile}\"`")
)
;
}
Expand Down