-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathGeneratedMigrationCodes.cs
More file actions
48 lines (45 loc) · 1.61 KB
/
GeneratedMigrationCodes.cs
File metadata and controls
48 lines (45 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using Shouldly;
using System.Diagnostics.CodeAnalysis;
namespace Lombiq.HelpfulExtensions.Tests.UI.Constants;
internal static class GeneratedMigrationCodes
{
[SuppressMessage(
"Usage",
"MA0136:Raw String contains an implicit end of line character",
Justification = "It's wrapped to prevent issues related to that.")]
private const string Page =
"""
await _contentDefinitionManager.AlterTypeDefinitionAsync("Page", type => type
.WithDisplayName("Page")
.Creatable()
.Listable()
.Draftable()
.Versionable()
.Securable()
.WithPart("TitlePart", part => part
.WithPosition("0")
)
.WithPart("AutoroutePart", part => part
.WithPosition("1")
.WithSettings(new AutoroutePartSettings
{
AllowCustomPath = true,
Pattern = "{{ Model.ContentItem | display_text | slugify }}",
ShowHomepageOption = true,
AllowUpdatePath = false,
AllowDisabled = false,
AllowRouteContainedItems = false,
ManageContainedItemRoutes = false,
AllowAbsolutePath = false,
})
)
.WithPart("FlowPart", part => part
.WithPosition("2")
)
.WithPart("Page", part => part
.WithPosition("3")
)
);
""";
public static void ShouldBePage(string actual) => actual.ShouldBeByLine(Page);
}