-
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix tests for new support configuration
- Loading branch information
1 parent
c4ad604
commit 42412eb
Showing
8 changed files
with
116 additions
and
43 deletions.
There are no files selected for viewing
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
79 changes: 79 additions & 0 deletions
79
tests/LinkDotNet.Blog.TestUtilities/SupportMeConfigurationBuilder.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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
using LinkDotNet.Blog.Web.Features.ShowBlogPost.Components; | ||
using LinkDotNet.Blog.Web.Features.SupportMe.Components; | ||
|
||
namespace LinkDotNet.Blog.TestUtilities; | ||
|
||
public class SupportMeConfigurationBuilder | ||
{ | ||
private string? kofiToken = "ABC"; | ||
private string? githubSponsorName = "linkdotnet"; | ||
private string? patreonName = "linkdotnet"; | ||
private bool showUnderBlogPost = true; | ||
private bool showUnderIntroduction = true; | ||
private bool showInFooter = true; | ||
private bool showSupportMePage = true; | ||
private string? supportMePageDescription = "Support me"; | ||
|
||
public SupportMeConfigurationBuilder WithKofiToken(string? kofiToken) | ||
{ | ||
this.kofiToken = kofiToken; | ||
return this; | ||
} | ||
|
||
public SupportMeConfigurationBuilder WithGithubSponsorName(string? githubSponsorName) | ||
{ | ||
this.githubSponsorName = githubSponsorName; | ||
return this; | ||
} | ||
|
||
public SupportMeConfigurationBuilder WithPatreonName(string? patreonName) | ||
{ | ||
this.patreonName = patreonName; | ||
return this; | ||
} | ||
|
||
public SupportMeConfigurationBuilder WithShowUnderBlogPost(bool showUnderBlogPost) | ||
{ | ||
this.showUnderBlogPost = showUnderBlogPost; | ||
return this; | ||
} | ||
|
||
public SupportMeConfigurationBuilder WithshowUnderIntroduction(bool showUnderIntroduction) | ||
{ | ||
this.showUnderIntroduction = showUnderIntroduction; | ||
return this; | ||
} | ||
|
||
public SupportMeConfigurationBuilder WithShowInFooter(bool showInFooter) | ||
{ | ||
this.showInFooter = showInFooter; | ||
return this; | ||
} | ||
|
||
public SupportMeConfigurationBuilder WithShowSupportMePage(bool showSupportMePage) | ||
{ | ||
this.showSupportMePage = showSupportMePage; | ||
return this; | ||
} | ||
|
||
public SupportMeConfigurationBuilder WithSupportMePageDescription(string? supportMePageDescription) | ||
{ | ||
this.supportMePageDescription = supportMePageDescription; | ||
return this; | ||
} | ||
|
||
public SupportMeConfiguration Build() | ||
{ | ||
return new SupportMeConfiguration | ||
{ | ||
KofiToken = kofiToken, | ||
GithubSponsorName = githubSponsorName, | ||
PatreonName = patreonName, | ||
ShowUnderBlogPost = showUnderBlogPost, | ||
ShowUnderIntroduction = showUnderIntroduction, | ||
ShowInFooter = showInFooter, | ||
ShowSupportMePage = showSupportMePage, | ||
SupportMePageDescription = supportMePageDescription, | ||
}; | ||
} | ||
} |
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
1 change: 1 addition & 0 deletions
1
tests/LinkDotNet.Blog.UnitTests/Web/Features/ShowBlogPost/Components/PatreonTests.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