- })
- providerUnderTest.ApiProvFuncs = &newFuncs
-
- err := providerUnderTest.UpdateFuncs(getProvider())
-
- assert.Nil(t, err)
- assert.Len(t, *providerUnderTest.ApiProvFuncs, 4)
- assert.True(t, providerUnderTest.IsFunctionRegistered("AEF_id_new_func_as_AEF"))
-}
-
-func TestUpdateFuncs_deleteFunction(t *testing.T) {
- providerUnderTest := getProvider()
-
- modFuncs := []APIProviderFunctionDetails{(*providerUnderTest.ApiProvFuncs)[0], (*providerUnderTest.ApiProvFuncs)[1]}
- providerUnderTest.ApiProvFuncs = &modFuncs
-
- err := providerUnderTest.UpdateFuncs(getProvider())
-
- assert.Nil(t, err)
- assert.Len(t, *providerUnderTest.ApiProvFuncs, 2)
- assert.True(t, providerUnderTest.IsFunctionRegistered(funcIdAPF))
- assert.True(t, providerUnderTest.IsFunctionRegistered(funcIdAMF))
-}
-
-func TestUpdateFuncs_unregisteredFunction(t *testing.T) {
- providerUnderTest := getProvider()
-
- unRegId := "unRegId"
- modFuncs := []APIProviderFunctionDetails{
- {
- ApiProvFuncId: &unRegId,