Skip to content

Commit 3d2228a

Browse files
committed
TransactionParticipantService.findSellersWithParents(): add unit test.
Fix #703
1 parent f41c0ca commit 3d2228a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/test/groovy/ru/mystamps/web/service/TransactionParticipantServiceImplTest.groovy

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,22 @@ class TransactionParticipantServiceImplTest extends Specification {
131131
result == expectedResult
132132
}
133133

134+
//
135+
// Tests for findSellersWithParents()
136+
//
137+
138+
@SuppressWarnings(['ClosureAsLastMethodParameter', 'UnnecessaryReturnKeyword'])
139+
def 'findSellersWithParents() should invoke dao and return its result'() {
140+
given:
141+
List<TransactionParticipantDto> expectedResult = Random.listOfTransactionParticipantDto()
142+
when:
143+
List<TransactionParticipantDto> result = service.findSellersWithParents()
144+
then:
145+
1 * transactionParticipantDao.findSellersWithParents() >> expectedResult
146+
and:
147+
result == expectedResult
148+
}
149+
134150
//
135151
// Tests for findAllGroups()
136152
//

0 commit comments

Comments
 (0)