X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=capifcore%2Finternal%2Fpublishserviceapi%2Ftypevalidation_test.go;h=39e36192475c199bf2cba8754d7302678ff1db5f;hb=refs%2Fchanges%2F96%2F10396%2F1;hp=ef4e35b88a9c10990ac18ab1485a6bfa94a2a962;hpb=f62685e5a2187fb58c7f27cdd1f14dd2c152880d;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)) +}