Skip to content

Commit

Permalink
refactor: inline form member
Browse files Browse the repository at this point in the history
  • Loading branch information
php-coder committed Mar 6, 2024
1 parent 44da819 commit d7fbf42
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,8 @@ class SeriesServiceImplTest extends Specification {
private final StampsCatalogService zagorskiCatalogService = Mock()

private SeriesService service
private AddSeriesForm form

def setup() {
form = new AddSeriesForm()
form.setQuantity(Random.quantity())
form.setPerforated(Random.perforated())
form.setCategory(TestObjects.createLinkEntityDto())

service = new SeriesServiceImpl(
NOPLogger.NOP_LOGGER,
seriesDao,
Expand All @@ -62,6 +56,11 @@ class SeriesServiceImplTest extends Specification {

def "add() should remove image when exception occurs"() {
given:
AddSeriesForm form = new AddSeriesForm()
form.setQuantity(Random.quantity())
form.setPerforated(Random.perforated())
form.setCategory(TestObjects.createLinkEntityDto())
and:
ImageInfoDto expectedImageInfo = TestObjects.createImageInfoDto()
and:
seriesDao.add(_ as AddSeriesDbDto) >> Random.id()
Expand Down

0 comments on commit d7fbf42

Please sign in to comment.