X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=capifcore%2Finternal%2Fprovidermanagementapi%2Ftypevalidation_test.go;h=b79a13be074ab8380a367edbe34b821da4285efd;hb=c21e101767fbde3a091a0ee7fef7782fedbe5b37;hp=7698aab4b1367499a80932f8891e63f949a4aa3a;hpb=f62685e5a2187fb58c7f27cdd1f14dd2c152880d;p=nonrtric%2Fplt%2Fsme.git diff --git a/capifcore/internal/providermanagementapi/typevalidation_test.go b/capifcore/internal/providermanagementapi/typevalidation_test.go index 7698aab..b79a13b 100644 --- a/capifcore/internal/providermanagementapi/typevalidation_test.go +++ b/capifcore/internal/providermanagementapi/typevalidation_test.go @@ -106,6 +106,21 @@ func TestValidateAPIProviderEnrolmentDetails(t *testing.T) { assert.Nil(t, providerDetailsUnderTest.Validate()) } +func TestIsRegistered(t *testing.T) { + regSec := "regSec" + providerUnderTest := APIProviderEnrolmentDetails{ + RegSec: regSec, + } + + otherProvider := APIProviderEnrolmentDetails{ + RegSec: "otherRegSec", + } + assert.False(t, providerUnderTest.IsRegistered(otherProvider)) + + otherProvider.RegSec = regSec + assert.True(t, providerUnderTest.IsRegistered(otherProvider)) +} + func getProvider() APIProviderEnrolmentDetails { testFuncs := []APIProviderFunctionDetails{ {