mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 16:11:10 +00:00
Adds AddBook unit tests
This commit is contained in:
1 parent
bd2880457c
commit
a3e956a165
12 files changed
+2579
-13
No files matched your search
+1
-2
@@ -60,7 +60,7 @@ public class AddBookCommandHandler : IRequestHandler<AddBookCommand, ErrorOr<Boo
|
||||
if (request.Series != null)
|
||||
{
|
||||
// TODO: add logic to search the book series repository for existing book series, based on the provided title
|
||||
// TODO: uncomment integration tests about series
|
||||
// TODO: uncomment integration and unit tests about series
|
||||
}
|
||||
var domainRatingsResult = request.Ratings.ConvertAll(rating => BookRating.Create(
|
||||
rating.Value ?? default,
|
||||
@@ -86,7 +86,6 @@ public class AddBookCommandHandler : IRequestHandler<AddBookCommand, ErrorOr<Boo
|
||||
return errors;
|
||||
List<Tag> domainTags = domainTagsResult.Select(tag => tag.Value).ToList();
|
||||
|
||||
|
||||
var domainIsbnsResult = request.ISBNs.ConvertAll(isbn => Isbn.Create(isbn.Value!, (IsbnFormat)(int)isbn.Format!));
|
||||
errors = domainIsbnsResult.Where(isbnResult => isbnResult.IsError).SelectMany(isbnResult => isbnResult.Errors).ToList();
|
||||
if (errors.Count != 0)
|
||||
|
||||
Reference in new issue
Block a user