File tree 2 files changed +17
-1
lines changed
main/java/ru/mystamps/web/service
test/groovy/ru/mystamps/web/service
2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -267,7 +267,6 @@ protected Boolean extractPerforated(String fragment) {
267
267
return null ;
268
268
}
269
269
270
- // @todo #694 SeriesInfoExtractorServiceImpl.extractMichelNumbers(): add unit tests
271
270
// @todo #694 SeriesInfoExtractorServiceImpl: support for a single Michel number
272
271
// @todo #694 SeriesInfoExtractorServiceImpl: support for a comma separated Michel numbers
273
272
protected Set <String > extractMichelNumbers (String fragment ) {
Original file line number Diff line number Diff line change @@ -377,6 +377,23 @@ class SeriesInfoExtractorServiceImplTest extends Specification {
377
377
' БЕЗЗУБЦОВЫЕ' | _
378
378
}
379
379
380
+ //
381
+ // Tests for extractMichelNumbers()
382
+ //
383
+
384
+ @Unroll
385
+ def ' extractMichelNumbers() should extract "#expected" from "#fragment"' (String fragment, Set<String > expected) {
386
+ expect :
387
+ service. extractMichelNumbers(fragment) == expected
388
+ where :
389
+ fragment || expected
390
+ nullOrBlank() || []
391
+ ' # 1-3' || [ ' 1' , ' 2' , ' 3' ]
392
+ ' #9997-9999' || [ ' 9997' , ' 9998' , ' 9999' ]
393
+ ' #9999-9997' || []
394
+ ' #0997-0999' || []
395
+ }
396
+
380
397
//
381
398
// Tests for extractSeller()
382
399
//
You can’t perform that action at this time.
0 commit comments