|
43 | 43 | import org.apache.hc.core5.http.ProtocolException; |
44 | 44 | import org.apache.hc.core5.http.io.entity.EntityUtils; |
45 | 45 | import org.eclipse.digitaltwin.aas4j.v3.dataformat.core.DeserializationException; |
46 | | -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultAssetAdministrationShell; |
47 | 46 | import org.eclipse.digitaltwin.basyx.http.Base64UrlEncodedIdentifier; |
48 | 47 | import org.eclipse.digitaltwin.basyx.http.HttpBaSyxHeader; |
49 | 48 | import org.eclipse.digitaltwin.basyx.http.pagination.Base64UrlEncodedCursor; |
@@ -193,15 +192,25 @@ public void getAllAasWithIdShort() throws IOException, ParseException { |
193 | 192 | } |
194 | 193 |
|
195 | 194 | @Test |
196 | | - public void getAllAasWithMultipleAssetIds() throws IOException, ParseException { |
| 195 | + public void getAllAasWithMultipleDifferentGlobalAssetIds() throws IOException, ParseException { |
197 | 196 | createMultipleAasOnServer(); |
198 | | - CloseableHttpResponse retrievalResponse = getAllAasMultipleGlobalAssetIdsParam(); |
| 197 | + CloseableHttpResponse retrievalResponse = getAllAasMultipleDifferentGlobalAssetIdsParam(); |
199 | 198 | assertEquals(HttpStatus.OK.value(), retrievalResponse.getCode()); |
200 | 199 |
|
201 | 200 | String actualJsonFromServer = BaSyxHttpTestUtils.getResponseAsString(retrievalResponse); |
202 | 201 | BaSyxHttpTestUtils.assertSameJSONContent(getEmptyResultJSONString(), getJSONWithoutCursorInfo(actualJsonFromServer)); |
203 | 202 | } |
204 | 203 |
|
| 204 | + @Test |
| 205 | + public void getAllAasWithMultipleIdenticalGlobalAssetIds() throws IOException, ParseException { |
| 206 | + createMultipleAasOnServer(); |
| 207 | + CloseableHttpResponse retrievalResponse = getAllAasMultipleIdenticalGlobalAssetIdsParam(); |
| 208 | + assertEquals(HttpStatus.OK.value(), retrievalResponse.getCode()); |
| 209 | + |
| 210 | + String actualJsonFromServer = BaSyxHttpTestUtils.getResponseAsString(retrievalResponse); |
| 211 | + BaSyxHttpTestUtils.assertSameJSONContent(getPaginatedAas1JSONString(), getJSONWithoutCursorInfo(actualJsonFromServer)); |
| 212 | + } |
| 213 | + |
205 | 214 | @Test |
206 | 215 | public void deleteAas() throws IOException { |
207 | 216 | createDummyAasOnServer(getAas1JSONString()); |
@@ -503,10 +512,14 @@ protected CloseableHttpResponse getAllAasGlobalAssetIdsParam() throws IOExceptio |
503 | 512 | return BaSyxHttpTestUtils.executeGetOnURL(getURL()+"?assetIds=ew0KIm5hbWUiOiJnbG9iYWxBc3NldElkIiwNCiJ2YWx1ZSI6Imdsb2JhbEFzc2V0SWQiDQp9"); |
504 | 513 | } |
505 | 514 |
|
506 | | - protected CloseableHttpResponse getAllAasMultipleGlobalAssetIdsParam() throws IOException { |
| 515 | + protected CloseableHttpResponse getAllAasMultipleDifferentGlobalAssetIdsParam() throws IOException { |
507 | 516 | return BaSyxHttpTestUtils.executeGetOnURL(getURL()+"?assetIds=ew0KIm5hbWUiOiJnbG9iYWxBc3NldElkIiwNCiJ2YWx1ZSI6Imdsb2JhbEFzc2V0SWQiDQp9&assetIds=ew0KIm5hbWUiOiJnbG9iYWxBc3NldElkIiwNCiJ2YWx1ZSI6ImR1bW15QWFzQXNzZXRJZCINCn0"); |
508 | 517 | } |
509 | 518 |
|
| 519 | + protected CloseableHttpResponse getAllAasMultipleIdenticalGlobalAssetIdsParam() throws IOException { |
| 520 | + return BaSyxHttpTestUtils.executeGetOnURL(getURL()+"?assetIds=ew0KIm5hbWUiOiJnbG9iYWxBc3NldElkIiwNCiJ2YWx1ZSI6Imdsb2JhbEFzc2V0SWQiDQp9&assetIds=ew0KIm5hbWUiOiJnbG9iYWxBc3NldElkIiwNCiJ2YWx1ZSI6Imdsb2JhbEFzc2V0SWQiDQp9"); |
| 521 | + } |
| 522 | + |
510 | 523 | protected CloseableHttpResponse getAllAasIdShortParam() throws IOException { |
511 | 524 | return BaSyxHttpTestUtils.executeGetOnURL(getURL()+"?idShort=ExampleMotor"); |
512 | 525 | } |
|
0 commit comments