Skip to content

Commit d5876f3

Browse files
committed
refactor: make expected value configurable in a test
1 parent d210b20 commit d5876f3

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -647,17 +647,17 @@ class SeriesInfoExtractorServiceImplTest extends Specification {
647647
}
648648

649649
@Unroll
650-
def 'extractPrice() should extract "10" from "#fragment"'(String fragment) {
650+
def 'extractPrice() should extract "#expected" from "#fragment"'(String fragment, BigDecimal expected) {
651651
expect:
652-
service.extractPrice(fragment) == BigDecimal.TEN
652+
service.extractPrice(fragment) == expected
653653
where:
654-
fragment | _
655-
'10$' | _
656-
'10 EUR' | _
657-
'10.0 EUR' | _
658-
'10.00 EUR' | _
659-
'10,00 EUR' | _
660-
'10 руб 16 коп' | _
654+
fragment | expected
655+
'10$' | BigDecimal.TEN
656+
'10 EUR' | BigDecimal.TEN
657+
'10.0 EUR' | BigDecimal.TEN
658+
'10.00 EUR' | BigDecimal.TEN
659+
'10,00 EUR' | BigDecimal.TEN
660+
'10 руб 16 коп' | BigDecimal.TEN
661661
}
662662

663663
@Unroll

0 commit comments

Comments
 (0)