|
@@ -39,9 +39,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
39
|
39
|
@SpringBootTest(classes = ZipConnectApp.class)
|
40
|
40
|
public class UserProfileResourceIntTest {
|
41
|
41
|
|
42
|
|
- private static final Long DEFAULT_PROFILE_ID = 1L;
|
43
|
|
- private static final Long UPDATED_PROFILE_ID = 2L;
|
44
|
|
-
|
45
|
42
|
private static final String DEFAULT_FIRST_NAME = "AAAAAAAAAA";
|
46
|
43
|
private static final String UPDATED_FIRST_NAME = "BBBBBBBBBB";
|
47
|
44
|
|
|
@@ -89,7 +86,6 @@ public class UserProfileResourceIntTest {
|
89
|
86
|
*/
|
90
|
87
|
public static UserProfile createEntity(EntityManager em) {
|
91
|
88
|
UserProfile userProfile = new UserProfile()
|
92
|
|
- .profileId(DEFAULT_PROFILE_ID)
|
93
|
89
|
.firstName(DEFAULT_FIRST_NAME)
|
94
|
90
|
.lastName(DEFAULT_LAST_NAME)
|
95
|
91
|
.userStack(DEFAULT_USER_STACK);
|
|
@@ -116,7 +112,6 @@ public class UserProfileResourceIntTest {
|
116
|
112
|
List<UserProfile> userProfileList = userProfileRepository.findAll();
|
117
|
113
|
assertThat(userProfileList).hasSize(databaseSizeBeforeCreate + 1);
|
118
|
114
|
UserProfile testUserProfile = userProfileList.get(userProfileList.size() - 1);
|
119
|
|
- assertThat(testUserProfile.getProfileId()).isEqualTo(DEFAULT_PROFILE_ID);
|
120
|
115
|
assertThat(testUserProfile.getFirstName()).isEqualTo(DEFAULT_FIRST_NAME);
|
121
|
116
|
assertThat(testUserProfile.getLastName()).isEqualTo(DEFAULT_LAST_NAME);
|
122
|
117
|
assertThat(testUserProfile.getUserStack()).isEqualTo(DEFAULT_USER_STACK);
|
|
@@ -152,7 +147,6 @@ public class UserProfileResourceIntTest {
|
152
|
147
|
.andExpect(status().isOk())
|
153
|
148
|
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
|
154
|
149
|
.andExpect(jsonPath("$.[*].id").value(hasItem(userProfile.getId().intValue())))
|
155
|
|
- .andExpect(jsonPath("$.[*].profileId").value(hasItem(DEFAULT_PROFILE_ID.intValue())))
|
156
|
150
|
.andExpect(jsonPath("$.[*].firstName").value(hasItem(DEFAULT_FIRST_NAME.toString())))
|
157
|
151
|
.andExpect(jsonPath("$.[*].lastName").value(hasItem(DEFAULT_LAST_NAME.toString())))
|
158
|
152
|
.andExpect(jsonPath("$.[*].userStack").value(hasItem(DEFAULT_USER_STACK.toString())));
|
|
@@ -169,7 +163,6 @@ public class UserProfileResourceIntTest {
|
169
|
163
|
.andExpect(status().isOk())
|
170
|
164
|
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
|
171
|
165
|
.andExpect(jsonPath("$.id").value(userProfile.getId().intValue()))
|
172
|
|
- .andExpect(jsonPath("$.profileId").value(DEFAULT_PROFILE_ID.intValue()))
|
173
|
166
|
.andExpect(jsonPath("$.firstName").value(DEFAULT_FIRST_NAME.toString()))
|
174
|
167
|
.andExpect(jsonPath("$.lastName").value(DEFAULT_LAST_NAME.toString()))
|
175
|
168
|
.andExpect(jsonPath("$.userStack").value(DEFAULT_USER_STACK.toString()));
|
|
@@ -196,7 +189,6 @@ public class UserProfileResourceIntTest {
|
196
|
189
|
// Disconnect from session so that the updates on updatedUserProfile are not directly saved in db
|
197
|
190
|
em.detach(updatedUserProfile);
|
198
|
191
|
updatedUserProfile
|
199
|
|
- .profileId(UPDATED_PROFILE_ID)
|
200
|
192
|
.firstName(UPDATED_FIRST_NAME)
|
201
|
193
|
.lastName(UPDATED_LAST_NAME)
|
202
|
194
|
.userStack(UPDATED_USER_STACK);
|
|
@@ -210,7 +202,6 @@ public class UserProfileResourceIntTest {
|
210
|
202
|
List<UserProfile> userProfileList = userProfileRepository.findAll();
|
211
|
203
|
assertThat(userProfileList).hasSize(databaseSizeBeforeUpdate);
|
212
|
204
|
UserProfile testUserProfile = userProfileList.get(userProfileList.size() - 1);
|
213
|
|
- assertThat(testUserProfile.getProfileId()).isEqualTo(UPDATED_PROFILE_ID);
|
214
|
205
|
assertThat(testUserProfile.getFirstName()).isEqualTo(UPDATED_FIRST_NAME);
|
215
|
206
|
assertThat(testUserProfile.getLastName()).isEqualTo(UPDATED_LAST_NAME);
|
216
|
207
|
assertThat(testUserProfile.getUserStack()).isEqualTo(UPDATED_USER_STACK);
|