mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 01:11:10 +00:00
Adds localization to Lumina.Presentation.Web project
This commit is contained in:
1 parent
771fa74991
commit
2c31fd8714
65 files changed
+1111
-319
No files matched your search
+1
-1
@@ -142,7 +142,7 @@ public class GetThumbnailEndpointTests : IClassFixture<AuthenticatedLuminaApiFac
|
||||
problemDetails["traceId"].GetString().Should().NotBeNullOrWhiteSpace();
|
||||
|
||||
Dictionary<string, string[]>? errors = problemDetails["errors"].Deserialize<Dictionary<string, string[]>>(_jsonOptions);
|
||||
errors.Should().ContainKey("General.Validation").WhoseValue.Should().BeEquivalentTo(["ImageQaulityMustBeBetweenZeroAndOneHundred"]);
|
||||
errors.Should().ContainKey("General.Validation").WhoseValue.Should().BeEquivalentTo(["ImageQualityMustBeBetweenZeroAndOneHundred"]);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
+1
-1
@@ -172,7 +172,7 @@ public class AuthLoginTests : IClassFixture<LuminaApiFactory>, IDisposable
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status429TooManyRequests);
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc7231#section-6.5.29");
|
||||
problemDetails["title"].GetString().Should().Be("TooManyRequests");
|
||||
problemDetails["detail"].GetString().Should().Be("Too many attempts. Please try again later.");
|
||||
problemDetails["detail"].GetString().Should().Be("TooManyRequests");
|
||||
problemDetails["retryAfter"].GetString().Should().Be("900");
|
||||
|
||||
lastResponse.Headers.Should().ContainKey("X-RateLimit-Limit");
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ public class AuthRecoverPasswordTests : IClassFixture<LuminaApiFactory>, IDispos
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status429TooManyRequests);
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc7231#section-6.5.29");
|
||||
problemDetails["title"].GetString().Should().Be("TooManyRequests");
|
||||
problemDetails["detail"].GetString().Should().Be("Too many attempts. Please try again later.");
|
||||
problemDetails["detail"].GetString().Should().Be("TooManyRequests");
|
||||
problemDetails["retryAfter"].GetString().Should().Be("900");
|
||||
|
||||
lastResponse.Headers.Should().ContainKey("X-RateLimit-Limit");
|
||||
|
||||
+1
-1
@@ -101,7 +101,7 @@ public class AuthRegisterTests : IClassFixture<LuminaApiFactory>, IDisposable
|
||||
problemDetails!["status"].GetInt32().Should().Be(StatusCodes.Status429TooManyRequests);
|
||||
problemDetails["type"].GetString().Should().Be("https://tools.ietf.org/html/rfc7231#section-6.5.29");
|
||||
problemDetails["title"].GetString().Should().Be("TooManyRequests");
|
||||
problemDetails["detail"].GetString().Should().Be("Too many attempts. Please try again later.");
|
||||
problemDetails["detail"].GetString().Should().Be("TooManyRequests");
|
||||
problemDetails["retryAfter"].GetString().Should().Be("900");
|
||||
|
||||
lastResponse.Headers.Should().ContainKey("X-RateLimit-Limit");
|
||||
|
||||
+2
-2
@@ -72,7 +72,7 @@ public class GetThumbnailQueryValidatorTests
|
||||
TestValidationResult<GetThumbnailQuery> result = _validator.TestValidate(query);
|
||||
|
||||
// Assert
|
||||
result.ShouldHaveValidationErrorFor(x => x.Quality).WithErrorMessage(Errors.Thumbnails.ImageQaulityMustBeBetweenZeroAndOneHundred.Description);
|
||||
result.ShouldHaveValidationErrorFor(x => x.Quality).WithErrorMessage(Errors.Thumbnails.ImageQualityMustBeBetweenZeroAndOneHundred.Description);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -85,7 +85,7 @@ public class GetThumbnailQueryValidatorTests
|
||||
TestValidationResult<GetThumbnailQuery> result = _validator.TestValidate(query);
|
||||
|
||||
// Assert
|
||||
result.ShouldHaveValidationErrorFor(x => x.Quality).WithErrorMessage(Errors.Thumbnails.ImageQaulityMustBeBetweenZeroAndOneHundred.Description);
|
||||
result.ShouldHaveValidationErrorFor(x => x.Quality).WithErrorMessage(Errors.Thumbnails.ImageQualityMustBeBetweenZeroAndOneHundred.Description);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
+1
-2
@@ -121,9 +121,8 @@ public class FluentValidationOptionsTests
|
||||
// Assert
|
||||
result.Should().BeOfType<ValidateOptionsResult>();
|
||||
result.Failed.Should().BeTrue();
|
||||
// TODO: should be modified to account for translation of error messages
|
||||
result.Failures.Should().ContainSingle()
|
||||
.Which.Should().Contain("Options validation failed for 'PropertyName' with error: 'Error Message'");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user