X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=capifcore%2Finternal%2Fpublishserviceapi%2Ftypevalidation_test.go;h=d7b59d5a3b8bfac81d05267a28925f227c372d47;hb=refs%2Fchanges%2F04%2F10404%2F1;hp=39e36192475c199bf2cba8754d7302678ff1db5f;hpb=e499f63287a0786ed1fb94f5bf2cce09422c518f;p=nonrtric%2Fplt%2Fsme.git diff --git a/capifcore/internal/publishserviceapi/typevalidation_test.go b/capifcore/internal/publishserviceapi/typevalidation_test.go index 39e3619..d7b59d5 100644 --- a/capifcore/internal/publishserviceapi/typevalidation_test.go +++ b/capifcore/internal/publishserviceapi/typevalidation_test.go @@ -39,7 +39,7 @@ func TestValidate(t *testing.T) { } -func TestIsServicePublished(t *testing.T) { +func TestValidateAlreadyPublished(t *testing.T) { apiName := "apiName" serviceUnderTest := ServiceAPIDescription{ ApiName: apiName, @@ -48,8 +48,8 @@ func TestIsServicePublished(t *testing.T) { otherService := ServiceAPIDescription{ ApiName: "otherApiName", } - assert.False(t, serviceUnderTest.IsPublished(otherService)) + assert.Nil(t, serviceUnderTest.ValidateAlreadyPublished(otherService)) otherService.ApiName = apiName - assert.True(t, serviceUnderTest.IsPublished(otherService)) + assert.NotNil(t, serviceUnderTest.ValidateAlreadyPublished(otherService)) }