X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=inline;f=capifcore%2Finternal%2Fprovidermanagementapi%2Ftypevalidation_test.go;h=a5a4e3c62e3a8981e1c3f75dc4db884328ceb8ce;hb=bf237808ac109b30461a453c59ff4e9cc9b297f4;hp=b79a13be074ab8380a367edbe34b821da4285efd;hpb=e499f63287a0786ed1fb94f5bf2cce09422c518f;p=nonrtric%2Fplt%2Fsme.git diff --git a/capifcore/internal/providermanagementapi/typevalidation_test.go b/capifcore/internal/providermanagementapi/typevalidation_test.go index b79a13b..a5a4e3c 100644 --- a/capifcore/internal/providermanagementapi/typevalidation_test.go +++ b/capifcore/internal/providermanagementapi/typevalidation_test.go @@ -106,7 +106,7 @@ func TestValidateAPIProviderEnrolmentDetails(t *testing.T) { assert.Nil(t, providerDetailsUnderTest.Validate()) } -func TestIsRegistered(t *testing.T) { +func TestValidateAlreadyRegistered(t *testing.T) { regSec := "regSec" providerUnderTest := APIProviderEnrolmentDetails{ RegSec: regSec, @@ -115,10 +115,10 @@ func TestIsRegistered(t *testing.T) { otherProvider := APIProviderEnrolmentDetails{ RegSec: "otherRegSec", } - assert.False(t, providerUnderTest.IsRegistered(otherProvider)) + assert.Nil(t, providerUnderTest.ValidateAlreadyRegistered(otherProvider)) otherProvider.RegSec = regSec - assert.True(t, providerUnderTest.IsRegistered(otherProvider)) + assert.NotNil(t, providerUnderTest.ValidateAlreadyRegistered(otherProvider)) } func getProvider() APIProviderEnrolmentDetails {