File tree 2 files changed +8
-7
lines changed
main/java/ru/mystamps/web/feature/series/importing
test/groovy/ru/mystamps/web/feature/series/importing
2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ public class SeriesInfoExtractorServiceImpl implements SeriesInfoExtractorServic
67
67
68
68
// Regular expression matches range of Michel catalog numbers (from 1 to 9999).
69
69
private static final Pattern MICHEL_NUMBERS_REGEXP =
70
- Pattern .compile ("# [ ]?(?<begin>[1-9][0-9]{0,3})-(?<end>[1-9][0-9]{0,3})" );
70
+ Pattern .compile ("(#|Michel) [ ]?(?<begin>[1-9][0-9]{0,3})-(?<end>[1-9][0-9]{0,3})" );
71
71
72
72
// Regular expression matches prices that have a space between digits.
73
73
private static final Pattern PRICE_WITH_SPACES = Pattern .compile ("([0-9]) ([0-9])" );
Original file line number Diff line number Diff line change @@ -472,14 +472,15 @@ class SeriesInfoExtractorServiceImplTest extends Specification {
472
472
expect :
473
473
service. extractMichelNumbers(fragment) == expected
474
474
where :
475
- fragment || expected
475
+ fragment || expected
476
476
// negative cases
477
- nullOrBlank() || []
478
- ' #9999-9997' || []
479
- ' #0997-0999' || []
477
+ nullOrBlank() || []
478
+ ' #9999-9997' || []
479
+ ' #0997-0999' || []
480
480
// positive cases
481
- ' # 1-3' || [ ' 1' , ' 2' , ' 3' ]
482
- ' #9997-9999' || [ ' 9997' , ' 9998' , ' 9999' ]
481
+ ' # 1-3' || [ ' 1' , ' 2' , ' 3' ]
482
+ ' #9997-9999' || [ ' 9997' , ' 9998' , ' 9999' ]
483
+ ' Michel 222-223' || [ ' 222' , ' 223' ]
483
484
}
484
485
485
486
//
You can’t perform that action at this time.
0 commit comments