Skip to content

Commit 9accb68

Browse files
committed
feat(series import): extract perforation info when description contains "б/перфорации".
1 parent 4abe490 commit 9accb68

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/main/java/ru/mystamps/web/feature/series/importing/SeriesInfoExtractorServiceImpl.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,10 @@ protected Boolean extractPerforated(String fragment) {
253253

254254
log.debug("Determining perforation from a fragment: '{}'", fragment);
255255

256-
boolean withoutPerforation = StringUtils.containsIgnoreCase(fragment, "б/з")
257-
|| StringUtils.containsIgnoreCase(fragment, "беззубцовые");
256+
boolean withoutPerforation =
257+
StringUtils.containsIgnoreCase(fragment, "б/з")
258+
|| StringUtils.containsIgnoreCase(fragment, "беззубцовые")
259+
|| StringUtils.containsIgnoreCase(fragment, "б/перфорации");
258260
if (withoutPerforation) {
259261
log.debug("Perforation is false");
260262
return Boolean.FALSE;

src/test/groovy/ru/mystamps/web/feature/series/importing/SeriesInfoExtractorServiceImplTest.groovy

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -413,11 +413,12 @@ class SeriesInfoExtractorServiceImplTest extends Specification {
413413
expect:
414414
service.extractPerforated(fragment) == false
415415
where:
416-
fragment | _
417-
'б/з' | _
418-
'Б/З' | _
419-
'беззубцовые' | _
420-
'БЕЗЗУБЦОВЫЕ' | _
416+
fragment | _
417+
'б/з' | _
418+
'Б/З' | _
419+
'беззубцовые' | _
420+
'БЕЗЗУБЦОВЫЕ' | _
421+
'б/перфорации' | _
421422
}
422423

423424
//

0 commit comments

Comments
 (0)