mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 17: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
+7
-7
@@ -43,10 +43,10 @@ public class GetTrackSegmentEndpointTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("MP4", "audio/mp4")] // mp4 delivery container
|
||||
[InlineData("OGG", "audio/ogg")] // ogg delivery container
|
||||
[InlineData("MP3", "audio/mpeg")] // mp3 delivery container
|
||||
[InlineData("not-a-container", "application/octet-stream")] // an unknown delivery container falls back to opaque binary
|
||||
[InlineData("MP4", "audio/mp4")] // MP4 delivery container.
|
||||
[InlineData("OGG", "audio/ogg")] // OGG delivery container.
|
||||
[InlineData("MP3", "audio/mpeg")] // MP3 delivery container.
|
||||
[InlineData("not-a-container", "application/octet-stream")] // An unknown delivery container falls back to opaque binary.
|
||||
public async Task ExecuteAsync_WhenSegmentIsProduced_ShouldReturnDisposingStreamResultWithTheSegment(string container, string expectedContentType)
|
||||
{
|
||||
// Arrange
|
||||
@@ -135,9 +135,9 @@ public class GetTrackSegmentEndpointTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("NotFound", StatusCodes.Status404NotFound)] // the delivery, track or segment does not exist
|
||||
[InlineData("Conflict", StatusCodes.Status409Conflict)] // the delivery changed since the manifest declared it
|
||||
[InlineData("ResourceUnavailable", StatusCodes.Status503ServiceUnavailable)] // the normalization pipeline is temporarily unavailable
|
||||
[InlineData("NotFound", StatusCodes.Status404NotFound)] // The delivery, track or segment does not exist.
|
||||
[InlineData("Conflict", StatusCodes.Status409Conflict)] // The delivery changed since the manifest declared it.
|
||||
[InlineData("ResourceUnavailable", StatusCodes.Status503ServiceUnavailable)] // The normalization pipeline is temporarily unavailable.
|
||||
public async Task ExecuteAsync_WhenHandlerReturnsAProblemError_ShouldReturnTheMappedStatusCode(string errorKind, int expectedStatusCode)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
+4
-4
@@ -75,10 +75,10 @@ public class GetTrackStreamEndpointTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(AudioFileFormat.MP3, "audio/mpeg")] // mp3 audio
|
||||
[InlineData(AudioFileFormat.FLAC, "audio/flac")] // flac audio
|
||||
[InlineData(AudioFileFormat.OGG, "audio/ogg")] // ogg audio
|
||||
[InlineData(AudioFileFormat.None, "application/octet-stream")] // an unrecognized format stays opaque binary
|
||||
[InlineData(AudioFileFormat.MP3, "audio/mpeg")] // MP3 audio.
|
||||
[InlineData(AudioFileFormat.FLAC, "audio/flac")] // FLAC audio.
|
||||
[InlineData(AudioFileFormat.OGG, "audio/ogg")] // OGG audio.
|
||||
[InlineData(AudioFileFormat.None, "application/octet-stream")] // An unrecognized format stays opaque binary.
|
||||
public async Task ExecuteAsync_WhenSuccessful_ShouldServeTheMediaTypeOfTheFormat(AudioFileFormat format, string expectedContentType)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
+12
-12
@@ -115,18 +115,18 @@ public class GetReadingResourceEndpointTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("image/png", "image/png")] // a non-svg image is inert content
|
||||
[InlineData("image/svg+xml", "application/octet-stream")] // an svg can be executed, so it is served as an opaque download
|
||||
[InlineData("audio/mpeg", "audio/mpeg")] // audio is inert content
|
||||
[InlineData("video/mp4", "video/mp4")] // video is inert content
|
||||
[InlineData("font/woff2", "font/woff2")] // fonts are inert content
|
||||
[InlineData("application/font-woff", "application/font-woff")] // legacy woff font media type
|
||||
[InlineData("application/font-woff2", "application/font-woff2")] // legacy woff2 font media type
|
||||
[InlineData("application/vnd.ms-opentype", "application/vnd.ms-opentype")] // opentype font media type
|
||||
[InlineData("application/x-font-ttf", "application/x-font-ttf")] // ttf font media type
|
||||
[InlineData("application/x-font-opentype", "application/x-font-opentype")] // otf font media type
|
||||
[InlineData("text/css", "text/css")] // stylesheets are inert content
|
||||
[InlineData("text/html", "application/octet-stream")] // an html document can be executed, so it is served as an opaque download
|
||||
[InlineData("image/png", "image/png")] // A non-svg image is inert content.
|
||||
[InlineData("image/svg+xml", "application/octet-stream")] // An svg can be executed, so it is served as an opaque download.
|
||||
[InlineData("audio/mpeg", "audio/mpeg")] // Audio is inert content.
|
||||
[InlineData("video/mp4", "video/mp4")] // Video is inert content.
|
||||
[InlineData("font/woff2", "font/woff2")] // Fonts are inert content.
|
||||
[InlineData("application/font-woff", "application/font-woff")] // Legacy woff font media type.
|
||||
[InlineData("application/font-woff2", "application/font-woff2")] // Legacy woff2 font media type.
|
||||
[InlineData("application/vnd.ms-opentype", "application/vnd.ms-opentype")] // Opentype font media type.
|
||||
[InlineData("application/x-font-ttf", "application/x-font-ttf")] // Ttf font media type.
|
||||
[InlineData("application/x-font-opentype", "application/x-font-opentype")] // Otf font media type.
|
||||
[InlineData("text/css", "text/css")] // Stylesheets are inert content.
|
||||
[InlineData("text/html", "application/octet-stream")] // An html document can be executed, so it is served as an opaque download.
|
||||
public async Task ExecuteAsync_WhenServingAResource_ShouldUseTheSafeContentType(string mimeType, string expectedContentType)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
Reference in new issue
Block a user