mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 14: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
+11
-11
@@ -35,10 +35,10 @@ public class GetAllUsersConsumptionStatisticsQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("")] // the library Id is empty
|
||||
[InlineData(" ")] // the library Id is whitespace only
|
||||
[InlineData("not-a-guid")] // the library Id is not a Guid
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // the library Id is the empty Guid
|
||||
[InlineData("")] // The library Id is empty.
|
||||
[InlineData(" ")] // The library Id is whitespace only.
|
||||
[InlineData("not-a-guid")] // The library Id is not a Guid.
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // The library Id is the empty Guid.
|
||||
public void Validate_WhenLibraryIdIsEmptyOrInvalid_ShouldHaveValidationError(string libraryId)
|
||||
{
|
||||
// Arrange
|
||||
@@ -104,10 +104,10 @@ public class GetAllUsersConsumptionStatisticsQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(nameof(MediaKind.MusicTrack))] // a kind supported by the current catalogues
|
||||
[InlineData(nameof(MediaKind.Book))] // another kind supported by the current catalogues
|
||||
[InlineData(nameof(MediaKind.Movie))] // a kind without a catalogue, still a defined kind
|
||||
[InlineData(nameof(MediaKind.Photo))] // a kind that every session counts for, still a defined kind
|
||||
[InlineData(nameof(MediaKind.MusicTrack))] // A kind supported by the current catalogues.
|
||||
[InlineData(nameof(MediaKind.Book))] // Another kind supported by the current catalogues.
|
||||
[InlineData(nameof(MediaKind.Movie))] // A kind without a catalogue, still a defined kind.
|
||||
[InlineData(nameof(MediaKind.Photo))] // A kind that every session counts for, still a defined kind.
|
||||
public void Validate_WhenMediaKindIsDefined_ShouldNotHaveValidationError(string mediaKind)
|
||||
{
|
||||
// Arrange
|
||||
@@ -180,9 +180,9 @@ public class GetAllUsersConsumptionStatisticsQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("")] // an empty bound
|
||||
[InlineData("not-a-date")] // a textual value that is not a date
|
||||
[InlineData("2026-13-45T99:99:99")] // a value with out of range components
|
||||
[InlineData("")] // An empty bound.
|
||||
[InlineData("not-a-date")] // A textual value that is not a date.
|
||||
[InlineData("2026-13-45T99:99:99")] // A value with out of range components.
|
||||
public void Validate_WhenADateRangeBoundIsNotAValidDate_ShouldHaveValidationError(string invalidBound)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
+4
-4
@@ -33,10 +33,10 @@ public class GetConsumptionRecordQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("")] // the consumption record Id is empty
|
||||
[InlineData(" ")] // the consumption record Id is whitespace only
|
||||
[InlineData("not-a-guid")] // the consumption record Id is not a Guid
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // the consumption record Id is the empty Guid
|
||||
[InlineData("")] // The consumption record Id is empty.
|
||||
[InlineData(" ")] // The consumption record Id is whitespace only.
|
||||
[InlineData("not-a-guid")] // The consumption record Id is not a Guid.
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // The consumption record Id is the empty Guid.
|
||||
public void Validate_WhenConsumptionRecordIdIsEmptyOrInvalid_ShouldHaveValidationError(string consumptionRecordId)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
+15
-15
@@ -35,10 +35,10 @@ public class GetConsumptionStatisticsQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("")] // the target user Id is empty
|
||||
[InlineData(" ")] // the target user Id is whitespace only
|
||||
[InlineData("not-a-guid")] // the target user Id is not a Guid
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // the target user Id is the empty Guid
|
||||
[InlineData("")] // The target user Id is empty.
|
||||
[InlineData(" ")] // The target user Id is whitespace only.
|
||||
[InlineData("not-a-guid")] // The target user Id is not a Guid.
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // The target user Id is the empty Guid.
|
||||
public void Validate_WhenTargetUserIdIsEmptyOrInvalid_ShouldHaveValidationError(string targetUserId)
|
||||
{
|
||||
// Arrange
|
||||
@@ -78,10 +78,10 @@ public class GetConsumptionStatisticsQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("")] // the library Id is empty
|
||||
[InlineData(" ")] // the library Id is whitespace only
|
||||
[InlineData("not-a-guid")] // the library Id is not a Guid
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // the library Id is the empty Guid
|
||||
[InlineData("")] // The library Id is empty.
|
||||
[InlineData(" ")] // The library Id is whitespace only.
|
||||
[InlineData("not-a-guid")] // The library Id is not a Guid.
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // The library Id is the empty Guid.
|
||||
public void Validate_WhenLibraryIdIsEmptyOrInvalid_ShouldHaveValidationError(string libraryId)
|
||||
{
|
||||
// Arrange
|
||||
@@ -147,10 +147,10 @@ public class GetConsumptionStatisticsQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(nameof(MediaKind.MusicTrack))] // a kind supported by the current catalogues
|
||||
[InlineData(nameof(MediaKind.Book))] // another kind supported by the current catalogues
|
||||
[InlineData(nameof(MediaKind.Movie))] // a kind without a catalogue, still a defined kind
|
||||
[InlineData(nameof(MediaKind.Photo))] // a kind that every session counts for, still a defined kind
|
||||
[InlineData(nameof(MediaKind.MusicTrack))] // A kind supported by the current catalogues.
|
||||
[InlineData(nameof(MediaKind.Book))] // Another kind supported by the current catalogues.
|
||||
[InlineData(nameof(MediaKind.Movie))] // A kind without a catalogue, still a defined kind.
|
||||
[InlineData(nameof(MediaKind.Photo))] // A kind that every session counts for, still a defined kind.
|
||||
public void Validate_WhenMediaKindIsDefined_ShouldNotHaveValidationError(string mediaKind)
|
||||
{
|
||||
// Arrange
|
||||
@@ -223,9 +223,9 @@ public class GetConsumptionStatisticsQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("")] // an empty bound
|
||||
[InlineData("not-a-date")] // a textual value that is not a date
|
||||
[InlineData("2026-13-45T99:99:99")] // a value with out of range components
|
||||
[InlineData("")] // An empty bound.
|
||||
[InlineData("not-a-date")] // A textual value that is not a date.
|
||||
[InlineData("2026-13-45T99:99:99")] // A value with out of range components.
|
||||
public void Validate_WhenADateRangeBoundIsNotAValidDate_ShouldHaveValidationError(string invalidBound)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
+22
-22
@@ -36,10 +36,10 @@ public class GetGenreConsumptionQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("")] // the target user Id is empty
|
||||
[InlineData(" ")] // the target user Id is whitespace only
|
||||
[InlineData("not-a-guid")] // the target user Id is not a Guid
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // the target user Id is the empty Guid
|
||||
[InlineData("")] // The target user Id is empty.
|
||||
[InlineData(" ")] // The target user Id is whitespace only.
|
||||
[InlineData("not-a-guid")] // The target user Id is not a Guid.
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // The target user Id is the empty Guid.
|
||||
public void Validate_WhenTargetUserIdIsEmptyOrInvalid_ShouldHaveValidationError(string targetUserId)
|
||||
{
|
||||
// Arrange
|
||||
@@ -79,10 +79,10 @@ public class GetGenreConsumptionQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("")] // the library Id is empty
|
||||
[InlineData(" ")] // the library Id is whitespace only
|
||||
[InlineData("not-a-guid")] // the library Id is not a Guid
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // the library Id is the empty Guid
|
||||
[InlineData("")] // The library Id is empty.
|
||||
[InlineData(" ")] // The library Id is whitespace only.
|
||||
[InlineData("not-a-guid")] // The library Id is not a Guid.
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // The library Id is the empty Guid.
|
||||
public void Validate_WhenLibraryIdIsEmptyOrInvalid_ShouldHaveValidationError(string libraryId)
|
||||
{
|
||||
// Arrange
|
||||
@@ -122,11 +122,11 @@ public class GetGenreConsumptionQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("")] // the media kind is empty
|
||||
[InlineData(" ")] // the media kind is whitespace only
|
||||
[InlineData("not-a-media-kind")] // the media kind is not a member name
|
||||
[InlineData("999")] // the media kind is numeric, which must not be accepted as a member name
|
||||
[InlineData("None")] // None is not a valid media kind for a consumption record
|
||||
[InlineData("")] // The media kind is empty.
|
||||
[InlineData(" ")] // The media kind is whitespace only.
|
||||
[InlineData("not-a-media-kind")] // The media kind is not a member name.
|
||||
[InlineData("999")] // The media kind is numeric, which must not be accepted as a member name.
|
||||
[InlineData("None")] // None is not a valid media kind for a consumption record.
|
||||
public void Validate_WhenMediaKindIsInvalid_ShouldHaveValidationError(string mediaKind)
|
||||
{
|
||||
// Arrange
|
||||
@@ -140,11 +140,11 @@ public class GetGenreConsumptionQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(nameof(MediaKind.MusicTrack))] // a kind supported by the current catalogues
|
||||
[InlineData(nameof(MediaKind.Book))] // another kind supported by the current catalogues
|
||||
[InlineData(nameof(MediaKind.Movie))] // a kind without a catalogue, still a defined kind
|
||||
[InlineData(nameof(MediaKind.Photo))] // a kind that every session counts for, still a defined kind
|
||||
[InlineData("musicTrack")] // member names are matched case-insensitively
|
||||
[InlineData(nameof(MediaKind.MusicTrack))] // A kind supported by the current catalogues.
|
||||
[InlineData(nameof(MediaKind.Book))] // Another kind supported by the current catalogues.
|
||||
[InlineData(nameof(MediaKind.Movie))] // A kind without a catalogue, still a defined kind.
|
||||
[InlineData(nameof(MediaKind.Photo))] // A kind that every session counts for, still a defined kind.
|
||||
[InlineData("musicTrack")] // Member names are matched case-insensitively.
|
||||
public void Validate_WhenMediaKindIsDefined_ShouldNotHaveValidationError(string mediaKind)
|
||||
{
|
||||
// Arrange
|
||||
@@ -158,8 +158,8 @@ public class GetGenreConsumptionQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("not-a-date")] // the start is not a date
|
||||
[InlineData("2026-13-01T00:00:00Z")] // the start is a date with an out of range month
|
||||
[InlineData("not-a-date")] // The start is not a date.
|
||||
[InlineData("2026-13-01T00:00:00Z")] // The start is a date with an out of range month.
|
||||
public void Validate_WhenFromUtcIsMalformed_ShouldHaveValidationError(string fromUtc)
|
||||
{
|
||||
// Arrange
|
||||
@@ -175,8 +175,8 @@ public class GetGenreConsumptionQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("not-a-date")] // the end is not a date
|
||||
[InlineData("2026-13-01T00:00:00Z")] // the end is a date with an out of range month
|
||||
[InlineData("not-a-date")] // The end is not a date.
|
||||
[InlineData("2026-13-01T00:00:00Z")] // The end is a date with an out of range month.
|
||||
public void Validate_WhenToUtcIsMalformed_ShouldHaveValidationError(string toUtc)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
+15
-15
@@ -35,10 +35,10 @@ public class GetMostConsumedQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("")] // the target user Id is empty
|
||||
[InlineData(" ")] // the target user Id is whitespace only
|
||||
[InlineData("not-a-guid")] // the target user Id is not a Guid
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // the target user Id is the empty Guid
|
||||
[InlineData("")] // The target user Id is empty.
|
||||
[InlineData(" ")] // The target user Id is whitespace only.
|
||||
[InlineData("not-a-guid")] // The target user Id is not a Guid.
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // The target user Id is the empty Guid.
|
||||
public void Validate_WhenTargetUserIdIsEmptyOrInvalid_ShouldHaveValidationError(string targetUserId)
|
||||
{
|
||||
// Arrange
|
||||
@@ -78,10 +78,10 @@ public class GetMostConsumedQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("")] // the library Id is empty
|
||||
[InlineData(" ")] // the library Id is whitespace only
|
||||
[InlineData("not-a-guid")] // the library Id is not a Guid
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // the library Id is the empty Guid
|
||||
[InlineData("")] // The library Id is empty.
|
||||
[InlineData(" ")] // The library Id is whitespace only.
|
||||
[InlineData("not-a-guid")] // The library Id is not a Guid.
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // The library Id is the empty Guid.
|
||||
public void Validate_WhenLibraryIdIsEmptyOrInvalid_ShouldHaveValidationError(string libraryId)
|
||||
{
|
||||
// Arrange
|
||||
@@ -147,10 +147,10 @@ public class GetMostConsumedQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(nameof(MediaKind.MusicTrack))] // a kind supported by the current catalogues
|
||||
[InlineData(nameof(MediaKind.Book))] // another kind supported by the current catalogues
|
||||
[InlineData(nameof(MediaKind.Movie))] // a kind without a catalogue, still a defined kind
|
||||
[InlineData(nameof(MediaKind.Photo))] // a kind that every session counts for, still a defined kind
|
||||
[InlineData(nameof(MediaKind.MusicTrack))] // A kind supported by the current catalogues.
|
||||
[InlineData(nameof(MediaKind.Book))] // Another kind supported by the current catalogues.
|
||||
[InlineData(nameof(MediaKind.Movie))] // A kind without a catalogue, still a defined kind.
|
||||
[InlineData(nameof(MediaKind.Photo))] // A kind that every session counts for, still a defined kind.
|
||||
public void Validate_WhenMediaKindIsDefined_ShouldNotHaveValidationError(string mediaKind)
|
||||
{
|
||||
// Arrange
|
||||
@@ -223,9 +223,9 @@ public class GetMostConsumedQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("")] // an empty bound
|
||||
[InlineData("not-a-date")] // a textual value that is not a date
|
||||
[InlineData("2026-13-45T99:99:99")] // a value with out of range components
|
||||
[InlineData("")] // An empty bound.
|
||||
[InlineData("not-a-date")] // A textual value that is not a date.
|
||||
[InlineData("2026-13-45T99:99:99")] // A value with out of range components.
|
||||
public void Validate_WhenADateRangeBoundIsNotAValidDate_ShouldHaveValidationError(string invalidBound)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
+15
-15
@@ -35,10 +35,10 @@ public class GetRecentlyConsumedQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("")] // the target user Id is empty
|
||||
[InlineData(" ")] // the target user Id is whitespace only
|
||||
[InlineData("not-a-guid")] // the target user Id is not a Guid
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // the target user Id is the empty Guid
|
||||
[InlineData("")] // The target user Id is empty.
|
||||
[InlineData(" ")] // The target user Id is whitespace only.
|
||||
[InlineData("not-a-guid")] // The target user Id is not a Guid.
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // The target user Id is the empty Guid.
|
||||
public void Validate_WhenTargetUserIdIsEmptyOrInvalid_ShouldHaveValidationError(string targetUserId)
|
||||
{
|
||||
// Arrange
|
||||
@@ -78,10 +78,10 @@ public class GetRecentlyConsumedQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("")] // the library Id is empty
|
||||
[InlineData(" ")] // the library Id is whitespace only
|
||||
[InlineData("not-a-guid")] // the library Id is not a Guid
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // the library Id is the empty Guid
|
||||
[InlineData("")] // The library Id is empty.
|
||||
[InlineData(" ")] // The library Id is whitespace only.
|
||||
[InlineData("not-a-guid")] // The library Id is not a Guid.
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // The library Id is the empty Guid.
|
||||
public void Validate_WhenLibraryIdIsEmptyOrInvalid_ShouldHaveValidationError(string libraryId)
|
||||
{
|
||||
// Arrange
|
||||
@@ -147,10 +147,10 @@ public class GetRecentlyConsumedQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(nameof(MediaKind.MusicTrack))] // a kind supported by the current catalogues
|
||||
[InlineData(nameof(MediaKind.Book))] // another kind supported by the current catalogues
|
||||
[InlineData(nameof(MediaKind.Movie))] // a kind without a catalogue, still a defined kind
|
||||
[InlineData(nameof(MediaKind.Photo))] // a kind that every session counts for, still a defined kind
|
||||
[InlineData(nameof(MediaKind.MusicTrack))] // A kind supported by the current catalogues.
|
||||
[InlineData(nameof(MediaKind.Book))] // Another kind supported by the current catalogues.
|
||||
[InlineData(nameof(MediaKind.Movie))] // A kind without a catalogue, still a defined kind.
|
||||
[InlineData(nameof(MediaKind.Photo))] // A kind that every session counts for, still a defined kind.
|
||||
public void Validate_WhenMediaKindIsDefined_ShouldNotHaveValidationError(string mediaKind)
|
||||
{
|
||||
// Arrange
|
||||
@@ -223,9 +223,9 @@ public class GetRecentlyConsumedQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("")] // an empty bound
|
||||
[InlineData("not-a-date")] // a textual value that is not a date
|
||||
[InlineData("2026-13-45T99:99:99")] // a value with out of range components
|
||||
[InlineData("")] // An empty bound.
|
||||
[InlineData("not-a-date")] // A textual value that is not a date.
|
||||
[InlineData("2026-13-45T99:99:99")] // A value with out of range components.
|
||||
public void Validate_WhenADateRangeBoundIsNotAValidDate_ShouldHaveValidationError(string invalidBound)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
+16
-16
@@ -34,11 +34,11 @@ public class GetResumePointQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("")] // the media kind is empty
|
||||
[InlineData(" ")] // the media kind is whitespace only
|
||||
[InlineData("not-a-media-kind")] // the media kind is not the name of a defined kind
|
||||
[InlineData("99999")] // a numeric value that is not the name of a defined kind
|
||||
[InlineData("1")] // a numeric value that parses to the defined MusicTrack member, which the old Enum.TryParse and Enum.IsDefined logic accepted
|
||||
[InlineData("")] // The media kind is empty.
|
||||
[InlineData(" ")] // The media kind is whitespace only.
|
||||
[InlineData("not-a-media-kind")] // The media kind is not the name of a defined kind.
|
||||
[InlineData("99999")] // A numeric value that is not the name of a defined kind.
|
||||
[InlineData("1")] // A numeric value that parses to the defined MusicTrack member, which the old Enum.TryParse and Enum.IsDefined logic accepted.
|
||||
public void Validate_WhenMediaKindIsNotTheNameOfADefinedKind_ShouldHaveValidationError(string mediaKind)
|
||||
{
|
||||
// Arrange
|
||||
@@ -52,10 +52,10 @@ public class GetResumePointQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(nameof(MediaKind.MusicTrack))] // a kind supported by the current catalogues
|
||||
[InlineData(nameof(MediaKind.Book))] // another kind supported by the current catalogues
|
||||
[InlineData(nameof(MediaKind.Movie))] // a kind without a catalogue, still a defined kind
|
||||
[InlineData(nameof(MediaKind.Photo))] // a kind that cannot be resumed, still a defined kind
|
||||
[InlineData(nameof(MediaKind.MusicTrack))] // A kind supported by the current catalogues.
|
||||
[InlineData(nameof(MediaKind.Book))] // Another kind supported by the current catalogues.
|
||||
[InlineData(nameof(MediaKind.Movie))] // A kind without a catalogue, still a defined kind.
|
||||
[InlineData(nameof(MediaKind.Photo))] // A kind that cannot be resumed, still a defined kind.
|
||||
public void Validate_WhenMediaKindIsTheNameOfADefinedKind_ShouldNotHaveValidationError(string mediaKind)
|
||||
{
|
||||
// Arrange
|
||||
@@ -69,9 +69,9 @@ public class GetResumePointQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("musictrack")] // the name of a defined kind, in lower case
|
||||
[InlineData("MUSICTRACK")] // the name of a defined kind, in upper case
|
||||
[InlineData("musicTrack")] // the name of a defined kind, in mixed case
|
||||
[InlineData("musictrack")] // The name of a defined kind, in lower case.
|
||||
[InlineData("MUSICTRACK")] // The name of a defined kind, in upper case.
|
||||
[InlineData("musicTrack")] // The name of a defined kind, in mixed case.
|
||||
public void Validate_WhenMediaKindIsTheNameOfADefinedKindInAnotherCase_ShouldNotHaveValidationError(string mediaKind)
|
||||
{
|
||||
// Arrange
|
||||
@@ -98,10 +98,10 @@ public class GetResumePointQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("")] // the media item Id is empty
|
||||
[InlineData(" ")] // the media item Id is whitespace only
|
||||
[InlineData("not-a-guid")] // the media item Id is not a Guid
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // the media item Id is the empty Guid
|
||||
[InlineData("")] // The media item Id is empty.
|
||||
[InlineData(" ")] // The media item Id is whitespace only.
|
||||
[InlineData("not-a-guid")] // The media item Id is not a Guid.
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // The media item Id is the empty Guid.
|
||||
public void Validate_WhenMediaItemIdIsEmptyOrInvalid_ShouldHaveValidationError(string mediaItemId)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
+15
-15
@@ -35,10 +35,10 @@ public class GetTagConsumptionQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("")] // the target user Id is empty
|
||||
[InlineData(" ")] // the target user Id is whitespace only
|
||||
[InlineData("not-a-guid")] // the target user Id is not a Guid
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // the target user Id is the empty Guid
|
||||
[InlineData("")] // The target user Id is empty.
|
||||
[InlineData(" ")] // The target user Id is whitespace only.
|
||||
[InlineData("not-a-guid")] // The target user Id is not a Guid.
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // The target user Id is the empty Guid.
|
||||
public void Validate_WhenTargetUserIdIsEmptyOrInvalid_ShouldHaveValidationError(string targetUserId)
|
||||
{
|
||||
// Arrange
|
||||
@@ -78,10 +78,10 @@ public class GetTagConsumptionQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("")] // the library Id is empty
|
||||
[InlineData(" ")] // the library Id is whitespace only
|
||||
[InlineData("not-a-guid")] // the library Id is not a Guid
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // the library Id is the empty Guid
|
||||
[InlineData("")] // The library Id is empty.
|
||||
[InlineData(" ")] // The library Id is whitespace only.
|
||||
[InlineData("not-a-guid")] // The library Id is not a Guid.
|
||||
[InlineData("00000000-0000-0000-0000-000000000000")] // The library Id is the empty Guid.
|
||||
public void Validate_WhenLibraryIdIsEmptyOrInvalid_ShouldHaveValidationError(string libraryId)
|
||||
{
|
||||
// Arrange
|
||||
@@ -147,10 +147,10 @@ public class GetTagConsumptionQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(nameof(MediaKind.MusicTrack))] // a kind supported by the current catalogues
|
||||
[InlineData(nameof(MediaKind.Book))] // another kind supported by the current catalogues
|
||||
[InlineData(nameof(MediaKind.Movie))] // a kind without a catalogue, still a defined kind
|
||||
[InlineData(nameof(MediaKind.Photo))] // a kind that every session counts for, still a defined kind
|
||||
[InlineData(nameof(MediaKind.MusicTrack))] // A kind supported by the current catalogues.
|
||||
[InlineData(nameof(MediaKind.Book))] // Another kind supported by the current catalogues.
|
||||
[InlineData(nameof(MediaKind.Movie))] // A kind without a catalogue, still a defined kind.
|
||||
[InlineData(nameof(MediaKind.Photo))] // A kind that every session counts for, still a defined kind.
|
||||
public void Validate_WhenMediaKindIsDefined_ShouldNotHaveValidationError(string mediaKind)
|
||||
{
|
||||
// Arrange
|
||||
@@ -223,9 +223,9 @@ public class GetTagConsumptionQueryValidatorTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("")] // an empty bound
|
||||
[InlineData("not-a-date")] // a textual value that is not a date
|
||||
[InlineData("2026-13-45T99:99:99")] // a value with out of range components
|
||||
[InlineData("")] // An empty bound.
|
||||
[InlineData("not-a-date")] // A textual value that is not a date.
|
||||
[InlineData("2026-13-45T99:99:99")] // A value with out of range components.
|
||||
public void Validate_WhenADateRangeBoundIsNotAValidDate_ShouldHaveValidationError(string invalidBound)
|
||||
{
|
||||
// Arrange
|
||||
|
||||
Reference in new issue
Block a user