@@ -410,7 +410,8 @@ class SeriesImportServiceImplTest extends Specification {
410
410
Random . categoryName(),
411
411
Random . countryName(),
412
412
null , /* imageUrl */
413
- Random . issueYear(). toString()
413
+ Random . issueYear(). toString(),
414
+ Random . quantity(). toString()
414
415
)
415
416
and :
416
417
extractorService. extractCategory(_ as String ) >> Collections . emptyList()
@@ -434,7 +435,8 @@ class SeriesImportServiceImplTest extends Specification {
434
435
Random . categoryName(),
435
436
Random . countryName(),
436
437
expectedImageUrl,
437
- Random . issueYear(). toString()
438
+ Random . issueYear(). toString(),
439
+ Random . quantity(). toString()
438
440
)
439
441
and :
440
442
extractorService. extractCategory(_ as String ) >> Collections . emptyList()
@@ -464,12 +466,14 @@ class SeriesImportServiceImplTest extends Specification {
464
466
List<Integer > expectedCountryIds = Random . listOfIntegers()
465
467
Integer expectedCategoryId = expectedCategoryIds. get(0 )
466
468
Integer expectedCountryId = expectedCountryIds. get(0 )
469
+ Integer expectedQuantity = Random . quantity()
467
470
and :
468
471
RawParsedDataDto parsedData = new RawParsedDataDto (
469
472
expectedCategoryName,
470
473
expectedCountryName,
471
474
Random . url(),
472
- expectedReleaseYear. toString()
475
+ expectedReleaseYear. toString(),
476
+ expectedQuantity. toString()
473
477
)
474
478
when :
475
479
service. saveParsedData(expectedRequestId, parsedData)
@@ -479,13 +483,16 @@ class SeriesImportServiceImplTest extends Specification {
479
483
1 * extractorService. extractCountry(expectedCountryName) >> expectedCountryIds
480
484
and :
481
485
1 * extractorService. extractReleaseYear(expectedReleaseYear. toString()) >> expectedReleaseYear
486
+ and :
487
+ 1 * extractorService. extractQuantity(expectedQuantity. toString()) >> expectedQuantity
482
488
and :
483
489
1 * seriesImportDao. addParsedContent(
484
490
expectedRequestId,
485
491
{ SaveParsedDataDbDto saveParsedData ->
486
492
assert saveParsedData?. categoryId == expectedCategoryId
487
493
assert saveParsedData?. countryId == expectedCountryId
488
494
assert saveParsedData?. releaseYear == expectedReleaseYear
495
+ assert saveParsedData?. quantity == expectedQuantity
489
496
return true
490
497
}
491
498
)
0 commit comments