Skip to content

Commit cf895bb

Browse files
committed
TestObjects: introduce name generator for transaction participant groups.
Fix #738
1 parent dd20a0f commit cf895bb

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class TransactionParticipantServiceImplTest extends Specification {
211211

212212
def 'findGroupIdByName() should invoke dao and return its result'() {
213213
given:
214-
String expectedName = 'Some Group'
214+
String expectedName = Random.participantGroupName()
215215
Integer expectedResult = Random.id()
216216
when:
217217
Integer result = service.findGroupIdByName(expectedName)

src/test/java/ru/mystamps/web/service/TestObjects.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,7 @@ public static RawParsedDataDto createRawParsedDataDto() {
235235

236236
public static EntityWithParentDto createEntityWithParentDto() {
237237
String name = Random.categoryName();
238-
// @todo #702 TestObjects: introduce name generator for transaction participant groups
239-
String parentName = Random.categoryName();
238+
String parentName = Random.participantGroupName();
240239
return new EntityWithParentDto(Random.id().toString(), name, parentName);
241240
}
242241

src/test/java/ru/mystamps/web/tests/Random.java

+6
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@ public static String participantName() {
149149
).english();
150150
}
151151

152+
// @todo #738 Random.participantGroupName(): make the generated names conform to
153+
// the validation rules (when they will appear)
154+
public static String participantGroupName() {
155+
return name();
156+
}
157+
152158
public static String sellerName() {
153159
return participantName();
154160
}

0 commit comments

Comments
 (0)