X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=capifcore%2Finternal%2Fpublishserviceapi%2Ftypevalidation_test.go;h=39e36192475c199bf2cba8754d7302678ff1db5f;hb=e499f63287a0786ed1fb94f5bf2cce09422c518f;hp=ef4e35b88a9c10990ac18ab1485a6bfa94a2a962;hpb=803745b67e70e58cb8731e3a377c4d6b8f800e51;p=nonrtric%2Fplt%2Fsme.git diff --git a/capifcore/internal/publishserviceapi/typevalidation_test.go b/capifcore/internal/publishserviceapi/typevalidation_test.go index ef4e35b..39e3619 100644 --- a/capifcore/internal/publishserviceapi/typevalidation_test.go +++ b/capifcore/internal/publishserviceapi/typevalidation_test.go @@ -38,3 +38,18 @@ func TestValidate(t *testing.T) { assert.Nil(t, err) } + +func TestIsServicePublished(t *testing.T) { + apiName := "apiName" + serviceUnderTest := ServiceAPIDescription{ + ApiName: apiName, + } + + otherService := ServiceAPIDescription{ + ApiName: "otherApiName", + } + assert.False(t, serviceUnderTest.IsPublished(otherService)) + + otherService.ApiName = apiName + assert.True(t, serviceUnderTest.IsPublished(otherService)) +}