Skip to content

Commit 32f6a20

Browse files
committed
TestObjects: propagate Random.id().
Addressed to #300 No functional changes.
1 parent 0065390 commit 32f6a20

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

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

+8-9
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ public final class TestObjects {
4646
private static final String TEST_URL = "test.example.org";
4747
private static final BigDecimal TEST_PRICE = new BigDecimal("100.99");
4848

49-
private static final Integer TEST_ENTITY_ID = 456;
5049
private static final String TEST_ENTITY_NAME = TEST_NAME;
5150
private static final String TEST_ENTITY_SLUG = "test-slug";
5251

@@ -70,7 +69,7 @@ public static UsersActivationDto createUsersActivationDto() {
7069
}
7170

7271
public static LinkEntityDto createLinkEntityDto() {
73-
return new LinkEntityDto(TEST_ENTITY_ID, TEST_ENTITY_SLUG, TEST_ENTITY_NAME);
72+
return new LinkEntityDto(Random.id(), TEST_ENTITY_SLUG, TEST_ENTITY_NAME);
7473
}
7574

7675
public static AddUserDbDto createAddUserDbDto() {
@@ -101,23 +100,23 @@ public static UserDetails createUserDetails() {
101100
}
102101

103102
public static ImageInfoDto createImageInfoDto() {
104-
return new ImageInfoDto(1, "PNG");
103+
return new ImageInfoDto(Random.id(), "PNG");
105104
}
106105

107106
public static DbImageDto createDbImageDto() {
108107
return new DbImageDto("PNG", "test".getBytes(StandardCharsets.UTF_8));
109108
}
110109

111110
public static SitemapInfoDto createSitemapInfoDto() {
112-
return new SitemapInfoDto(1, new Date());
111+
return new SitemapInfoDto(Random.id(), new Date());
113112
}
114113

115114
@SuppressWarnings("checkstyle:magicnumber")
116115
public static SeriesInfoDto createSeriesInfoDto() {
117116
return new SeriesInfoDto(
118-
12,
119-
13, "test-category", "Test Category",
120-
14, "test-country", "Test Country",
117+
Random.id(),
118+
Random.id(), "test-category", "Test Category",
119+
Random.id(), "test-country", "Test Country",
121120
15, 10, 2000,
122121
16,
123122
true
@@ -144,7 +143,7 @@ public static SeriesFullInfoDto createSeriesFullInfoDto() {
144143

145144
@SuppressWarnings("checkstyle:magicnumber")
146145
public static CollectionInfoDto createCollectionInfoDto() {
147-
return new CollectionInfoDto(101, "test-user", "Test User");
146+
return new CollectionInfoDto(Random.id(), "test-user", "Test User");
148147
}
149148

150149
public static SuspiciousActivityDto createSuspiciousActivityDto() {
@@ -179,7 +178,7 @@ public static PurchaseAndSaleDto createPurchaseAndSaleDto() {
179178
}
180179

181180
public static EntityWithIdDto createEntityWithIdDto() {
182-
return new EntityWithIdDto(TEST_ENTITY_ID, TEST_ENTITY_NAME);
181+
return new EntityWithIdDto(Random.id(), TEST_ENTITY_NAME);
183182
}
184183

185184
public static ImportRequestDto createImportRequestDto() {

0 commit comments

Comments
 (0)