-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
OSOE-818: Upgrade to Orchard Core 2.0
- Loading branch information
Showing
58 changed files
with
421 additions
and
256 deletions.
There are no files selected for viewing
75 changes: 42 additions & 33 deletions
75
Lombiq.HelpfulExtensions.Tests.UI/Constants/GeneratedMigrationCodes.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,48 @@ | ||
using System; | ||
using Shouldly; | ||
using System.Diagnostics.CodeAnalysis; | ||
|
||
namespace Lombiq.HelpfulExtensions.Tests.UI.Constants; | ||
|
||
internal static class GeneratedMigrationCodes | ||
{ | ||
// Environment.NewLine is used for this to work regardless of the mismatch of line ending style between the code | ||
// file, the platform where it was compiled, and where it was executed. | ||
public static string Page = | ||
string.Join( | ||
Environment.NewLine, | ||
"_contentDefinitionManager.AlterTypeDefinition(\"Page\", type => type", | ||
" .DisplayedAs(\"Page\")", | ||
" .Creatable()", | ||
" .Listable()", | ||
" .Draftable()", | ||
" .Versionable()", | ||
" .Securable()", | ||
" .WithPart(\"TitlePart\", part => part", | ||
" .WithPosition(\"0\")", | ||
" )", | ||
" .WithPart(\"AutoroutePart\", part => part", | ||
" .WithPosition(\"1\")", | ||
" .WithSettings(new AutoroutePartSettings", | ||
" {", | ||
" AllowCustomPath = true,", | ||
" ShowHomepageOption = true,", | ||
" Pattern = \"{{ Model.ContentItem | display_text | slugify }}\",", | ||
" })", | ||
" )", | ||
" .WithPart(\"FlowPart\", part => part", | ||
" .WithPosition(\"2\")", | ||
" )", | ||
" .WithPart(\"Page\", part => part", | ||
" .WithPosition(\"3\")", | ||
" )", | ||
");", | ||
string.Empty); | ||
[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 = | ||
""" | ||
_contentDefinitionManager.AlterTypeDefinition("Page", type => type | ||
.DisplayedAs("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); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.