Skip to content

Commit 5caf511

Browse files
authored
Adds missing tests for the AasRepositoryClient (#13)
* Adds further tests to the AasRepositoryClient * Adds tests for asset information endpoints * Adds tests for thumbnail endpoints * Adds tests for submodel references endpoints
1 parent 8b5d6c3 commit 5caf511

File tree

2 files changed

+603
-8
lines changed

2 files changed

+603
-8
lines changed

src/clients/AasRepositoryClient.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -383,17 +383,17 @@ export class AasRepositoryClient {
383383
* @function getAllSubmodelReferences
384384
* @param baseURL The API base URL
385385
* @param aasIdentifier The Asset Administration Shell’s unique id (UTF8-BASE64-URL-encoded)
386+
* @param headers Request headers
386387
* @param limit The maximum number of elements in the response array
387388
* @param cursor A server-generated identifier retrieved from pagingMetadata that specifies from which position the result listing should continue
388-
* @param headers Request headers
389389
* @returns {Promise<getAllSubmodelReferencesResponse>} Requested submodel references
390390
*/
391391
async getAllSubmodelReferences(
392392
baseURL: string,
393393
aasIdentifier: string,
394+
headers?: Headers,
394395
limit?: number,
395-
cursor?: string,
396-
headers?: Headers
396+
cursor?: string
397397
): Promise<getAllSubmodelReferencesResponse> {
398398
try {
399399
const client = createCustomClient(baseURL, headers);
@@ -419,7 +419,7 @@ export class AasRepositoryClient {
419419
result: submodelReferences,
420420
};
421421
} catch (error) {
422-
console.error('Error fetching submodel references:', error);
422+
console.error('Error fetching Submodel References:', error);
423423
throw error;
424424
}
425425
}
@@ -457,7 +457,7 @@ export class AasRepositoryClient {
457457

458458
return convertApiReferenceToCoreReference(data);
459459
} catch (error) {
460-
console.error('Error creating submodel reference:', error);
460+
console.error('Error creating Submodel Reference:', error);
461461
throw error;
462462
}
463463
}
@@ -494,7 +494,7 @@ export class AasRepositoryClient {
494494

495495
return;
496496
} catch (error) {
497-
console.error('Error deleting submodel reference:', error);
497+
console.error('Error deleting Submodel Reference:', error);
498498
throw error;
499499
}
500500
}

0 commit comments

Comments
 (0)