mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 10:11:10 +00:00
Formats code comments as sentences in the tests.
Capitalizes the first word and adds the terminal period in the unit, integration and security tests. The AAA markers stay bare, the TODO bodies stay lowercase, and no assertion, payload, expected status code or test signature changes.
This commit is contained in:
1 parent
727aa33318
commit
057f557791
540 files changed
+3888
-3888
No files matched your search
+4
-4
@@ -90,10 +90,10 @@ public class GetFavoritesEndpointTests : IClassFixture<LuminaWebFactory>, IDispo
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("", "users/me/favorites?currentPage=1&perPage=200")] // neither the page nor the size is supplied
|
||||
[InlineData("?currentPage=3", "users/me/favorites?currentPage=3&perPage=200")] // only the page is supplied
|
||||
[InlineData("?perPage=25", "users/me/favorites?currentPage=1&perPage=25")] // only the size is supplied
|
||||
[InlineData("?currentPage=2&perPage=50", "users/me/favorites?currentPage=2&perPage=50")] // both the page and the size are supplied
|
||||
[InlineData("", "users/me/favorites?currentPage=1&perPage=200")] // Neither the page nor the size is supplied.
|
||||
[InlineData("?currentPage=3", "users/me/favorites?currentPage=3&perPage=200")] // Only the page is supplied.
|
||||
[InlineData("?perPage=25", "users/me/favorites?currentPage=1&perPage=25")] // Only the size is supplied.
|
||||
[InlineData("?currentPage=2&perPage=50", "users/me/favorites?currentPage=2&perPage=50")] // Both the page and the size are supplied.
|
||||
public async Task GetFavorites_WhenCalledWithPagination_ShouldForwardTheDocumentedUpstreamUrl(string queryString, string expectedUpstreamEndpoint)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
+3
-3
@@ -73,9 +73,9 @@ public class HomeIndexEndpointTests : IClassFixture<LuminaWebFactory>
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("/de-de")] // German culture
|
||||
[InlineData("/fr-fr")] // French culture
|
||||
[InlineData("/ja-jp")] // Japanese culture
|
||||
[InlineData("/de-de")] // German culture.
|
||||
[InlineData("/fr-fr")] // French culture.
|
||||
[InlineData("/ja-jp")] // Japanese culture.
|
||||
public async Task Home_WhenCalledByAuthenticatedUserWithLocalizedCulture_ShouldReturnHomePage(string culturePath)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
+2
-2
@@ -150,8 +150,8 @@ public class GetPlaybackManifestEndpointTests : IClassFixture<LuminaWebFactory>
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("'; DROP TABLE Tracks; --")] // destructive injection
|
||||
[InlineData("' OR '1'='1")] // boolean-based injection
|
||||
[InlineData("'; DROP TABLE Tracks; --")] // Destructive injection.
|
||||
[InlineData("' OR '1'='1")] // Boolean-based injection.
|
||||
public async Task GetPlaybackManifest_WithSQLInjectionInRouteId_ShouldNormalizeTheIdWithoutLeakingData(string maliciousId)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
+4
-4
@@ -100,8 +100,8 @@ public class StreamMusicTrackEndpointTests : IClassFixture<LuminaWebFactory>
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(HttpStatusCode.ServiceUnavailable)] // a busy normalization pipeline is a transient condition
|
||||
[InlineData(HttpStatusCode.TooManyRequests)] // the stream concurrency limit was reached
|
||||
[InlineData(HttpStatusCode.ServiceUnavailable)] // A busy normalization pipeline is a transient condition.
|
||||
[InlineData(HttpStatusCode.TooManyRequests)] // The stream concurrency limit was reached.
|
||||
public async Task StreamMusicTrack_WhenApiReportsATransientCondition_ShouldReturnABareStatus(HttpStatusCode statusCode)
|
||||
{
|
||||
// Arrange
|
||||
@@ -131,8 +131,8 @@ public class StreamMusicTrackEndpointTests : IClassFixture<LuminaWebFactory>
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(HttpStatusCode.ServiceUnavailable)] // a busy normalization pipeline is a transient condition
|
||||
[InlineData(HttpStatusCode.TooManyRequests)] // the stream concurrency limit was reached
|
||||
[InlineData(HttpStatusCode.ServiceUnavailable)] // A busy normalization pipeline is a transient condition.
|
||||
[InlineData(HttpStatusCode.TooManyRequests)] // The stream concurrency limit was reached.
|
||||
public async Task StreamMusicTrack_WhenApiReportsATransientConditionForANonMediaCaller_ShouldStillReturnABareStatus(HttpStatusCode statusCode)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
+2
-2
@@ -91,8 +91,8 @@ public class StreamMusicTrackSegmentEndpointTests : IClassFixture<LuminaWebFacto
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(HttpStatusCode.ServiceUnavailable)] // a busy normalization pipeline is a transient condition
|
||||
[InlineData(HttpStatusCode.TooManyRequests)] // the stream concurrency limit was reached
|
||||
[InlineData(HttpStatusCode.ServiceUnavailable)] // A busy normalization pipeline is a transient condition.
|
||||
[InlineData(HttpStatusCode.TooManyRequests)] // The stream concurrency limit was reached.
|
||||
public async Task StreamMusicTrackSegment_WhenApiReportsATransientCondition_ShouldReturnABareStatus(HttpStatusCode statusCode)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@ public class LibrariesIndexViewEndpointTests : IClassFixture<LuminaWebFactory>
|
||||
public async Task LibrariesIndexView_WhenRenderedInACultureWithNonAsciiLabels_ShouldInjectTheScriptLabelsAsJson()
|
||||
{
|
||||
// Arrange
|
||||
// Razor would encode the non-ASCII letters of a raw label as HTML entities, which the browser shows literally inside a script, while JSON escapes them
|
||||
// Razor would encode the non-ASCII letters of a raw label as HTML entities, which the browser shows literally inside a script, while JSON escapes them.
|
||||
_apiFactory.ApiClientStub.Reset();
|
||||
AuthenticatedWebClient webClient = await WebTestHelpers.CreateAuthenticatedClientAsync(_apiFactory);
|
||||
|
||||
|
||||
+3
-3
@@ -205,9 +205,9 @@ public class GetResumePointEndpointTests : IClassFixture<LuminaWebFactory>
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("MediaResumePointNotFound")] // the user has no resume point for the media item
|
||||
[InlineData("BookNotFound")] // the book of the resume point no longer exists
|
||||
[InlineData("TrackNotFound")] // the track of the resume point no longer exists
|
||||
[InlineData("MediaResumePointNotFound")] // The user has no resume point for the media item.
|
||||
[InlineData("BookNotFound")] // The book of the resume point no longer exists.
|
||||
[InlineData("TrackNotFound")] // The track of the resume point no longer exists.
|
||||
public async Task GetResumePoint_WhenApiReportsAnAbsentResumePoint_ShouldReturnSuccessWithNullData(string detail)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
+3
-3
@@ -44,9 +44,9 @@ public class LoginViewEndpointTests : IClassFixture<LuminaWebFactory>
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("/de-de/auth/login")] // German culture
|
||||
[InlineData("/fr-fr/auth/login")] // French culture
|
||||
[InlineData("/zh-cn/auth/login")] // Chinese culture
|
||||
[InlineData("/de-de/auth/login")] // German culture.
|
||||
[InlineData("/fr-fr/auth/login")] // French culture.
|
||||
[InlineData("/zh-cn/auth/login")] // Chinese culture.
|
||||
public async Task LoginView_WhenCalledWithLocalizedCulture_ShouldRenderLoginPage(string culturePath)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
Reference in new issue
Block a user