@@ -606,7 +606,7 @@ At this documentation you will have all information and related files and exampl
## Test Case 13: Delete APIs Published by NON Authorised apfId
**Test ID**: ***capif_api_publish_service-12***
**Test ID**: ***capif_api_publish_service-13***
**Description**:
@@ -646,6 +646,81 @@ At this documentation you will have all information and related files and exampl
* detail with message "User not authorized".
* cause with message "Certificate not authorized".
## Test Case 14: Check Two Published APIs with different APFs are removed when Provider is deleted
**Test ID**: ***capif_api_publish_service-13***
**Description**:
This test case will check that a Provider registered with two APFs, with one API published with each APF are removed properly when provider is removed.
**Pre-Conditions**:
* CAPIF subscriber is pre-authorised (has valid apfId from CAPIF Authority).
**Execution Steps**:
1. Register Provider with 2 APFs at CCF and store certificates.
2. Publish **service_1** API with **APF_1**
3. Publish **service_2** API with **APF_2**
4. Retrieve APIs published by **APF_1**
5. Retrieve APIs published by **APF_2**
6. Remove Provider by **AMF**
**Information of Test**:
1. Perform [Provider Registration] and [Invoker Onboarding]
2. Publish **service_1** Service API at CCF:
* Send **POST** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId1}/service-apis**
* body [service api description] with apiName **service_1**
* Get apiId
* Use **APF_1 Certificate**
3. Publish **service_2** Service API at CCF:
* Send **POST** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId2}/service-apis**
* body [service api description] with apiName **service_2**
* Get apiId
* Use **APF_2 Certificate**
4. Retrieve all published APIs by **APF_1**:
* Send **GET** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId1}/service-apis**
* Use **APF_1 Certificate**
5. Retrieve all published APIs by **APF_2**:
* Send **GET** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId2}/service-apis**
* Use **APF_2 Certificate**
6. Get Number of services published by superadmin:
1. Store value obtained in **services_present_on_ccf_after_publish**
8. Get Number of services published by superadmin:
1. Store value obtained in **services_present_on_ccf_after_delete_provider**
**Expected Result**:
1. Response to Publish request must accomplish:
1.**201 Created**
2. Response Body must follow **ServiceAPIDescription** data structure with:
* apiId
1. Response Header **Location** must be received with URI to new resource created, following this structure: **{apiRoot}/published-apis/v1/{apfId1}/service-apis/{serviceApiId}**
2. Response to Publish request must accomplish:
1.**201 Created**
2. Response Body must follow **ServiceAPIDescription** data structure with:
* apiId
3. Response Header **Location** must be received with URI to new resource created, following this structure: **{apiRoot}/published-apis/v1/{apfId2}/service-apis/{serviceApiId}**
3. Response to Retrieve all published APIs by **APF_1**:
1.**200 OK**
2. Response body must return an array of **ServiceAPIDescription** data.
3. Array must contain all previously published APIs by **APF_1**.
4. Response to Retrieve all published APIs by **APF_2**:
1.**200 OK**
2. Response body must return an array of **ServiceAPIDescription** data.
3. Array must contain all previously published APIs by **APF_2**.
5. Delete Provider:
1.**204 No Content** response.
6. Check two APIs where removed after remove provider: