File tree 2 files changed +26
-1
lines changed
main/java/ru/mystamps/web/service
test/groovy/ru/mystamps/web/service
2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,6 @@ protected Integer extractQuantity(String fragment) {
218
218
return null ;
219
219
}
220
220
221
- // @todo #782 SeriesInfoExtractorServiceImpl.extractPerforated(): add unit tests
222
221
// @todo #782 Series import: add integration test for extracting perforation flag
223
222
protected Boolean extractPerforated (String fragment ) {
224
223
if (StringUtils .isBlank (fragment )) {
Original file line number Diff line number Diff line change @@ -337,6 +337,32 @@ class SeriesInfoExtractorServiceImplTest extends Specification {
337
337
' 4 беззубцовые марки' || 4
338
338
' 32 БЕЗЗУБЦОВЫЕ МАРКИ' || 32
339
339
}
340
+
341
+ //
342
+ // Tests for extractPerforated()
343
+ //
344
+
345
+ def ' extractPerforated() should return null when fragment is null, empty or blank' () {
346
+ expect :
347
+ service. extractPerforated(nullOrBlank()) == null
348
+ }
349
+
350
+ def ' extractPerforated() should return null when nothing to extract' () {
351
+ expect :
352
+ service. extractPerforated(' 10 марок' ) == null
353
+ }
354
+
355
+ @Unroll
356
+ def ' extractPerforated() should extract perforated from "#fragment"' (String fragment) {
357
+ expect :
358
+ service. extractPerforated(fragment) == false
359
+ where :
360
+ fragment | _
361
+ ' б/з' | _
362
+ ' Б/З' | _
363
+ ' беззубцовые' | _
364
+ ' БЕЗЗУБЦОВЫЕ' | _
365
+ }
340
366
341
367
//
342
368
// Tests for extractSeller()
You can’t perform that action at this time.
0 commit comments