diff options
author | 杨宇千 <crupest@outlook.com> | 2019-10-25 18:46:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-25 18:46:01 +0800 |
commit | a175f8328d7a6c36464676d54fc50d03e64be0af (patch) | |
tree | c6ec0a916c78a02b36113fb62f0e919019df6cfc /Timeline.Tests/UsernameValidatorUnitTest.cs | |
parent | 681e2cc9ecaeefd883a7c6645374926c184fba5d (diff) | |
parent | 5790142f81f2a94ad073834b1534acbf9b02ea3c (diff) | |
download | timeline-a175f8328d7a6c36464676d54fc50d03e64be0af.tar.gz timeline-a175f8328d7a6c36464676d54fc50d03e64be0af.tar.bz2 timeline-a175f8328d7a6c36464676d54fc50d03e64be0af.zip |
Merge pull request #52 from crupest/i18n
Add NeutralResourcesLanguage. Conform to best practices.
Diffstat (limited to 'Timeline.Tests/UsernameValidatorUnitTest.cs')
-rw-r--r-- | Timeline.Tests/UsernameValidatorUnitTest.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Timeline.Tests/UsernameValidatorUnitTest.cs b/Timeline.Tests/UsernameValidatorUnitTest.cs index 283e18e2..d02367be 100644 --- a/Timeline.Tests/UsernameValidatorUnitTest.cs +++ b/Timeline.Tests/UsernameValidatorUnitTest.cs @@ -4,6 +4,7 @@ using Xunit; namespace Timeline.Tests
{
+ [UseCulture("en")]
public class UsernameValidatorUnitTest : IClassFixture<UsernameValidator>
{
private readonly UsernameValidator _validator;
@@ -15,9 +16,9 @@ namespace Timeline.Tests private string FailAndMessage(string username)
{
- var (result, messageGenerator) = _validator.Validate(username);
+ var (result, message) = _validator.Validate(username);
result.Should().BeFalse();
- return messageGenerator(null);
+ return message;
}
[Fact]
@@ -29,9 +30,8 @@ namespace Timeline.Tests [Fact]
public void NotString()
{
- var (result, messageGenerator) = _validator.Validate(123);
+ var (result, message) = _validator.Validate(123);
result.Should().BeFalse();
- var message = messageGenerator(null);
message.Should().ContainEquivalentOf("type");
}
|