Search in sources :

Example 1 with Internallink

use of uk.nhs.digital.website.beans.Internallink in project hippo by NHS-digital-website.

the class ApiCatalogueComponentTest method internalLinkToDocTaggedWith.

private Internallink internalLinkToDocTaggedWith(final String... taxonomyKeys) {
    final HippoBean bean = mock(HippoBean.class);
    given(bean.getProperties()).willReturn(Collections.singletonMap("hippotaxonomy:keys", taxonomyKeys));
    final Internallink link = mock(Internallink.class);
    given(link.getLinkType()).willReturn("internal");
    given(link.getLink()).willReturn(bean);
    given(link.toString()).willReturn("Internallink of a doc tagged with: " + String.join(", ", taxonomyKeys));
    return link;
}
Also used : HippoBean(org.hippoecm.hst.content.beans.standard.HippoBean) Internallink(uk.nhs.digital.website.beans.Internallink)

Aggregations

HippoBean (org.hippoecm.hst.content.beans.standard.HippoBean)1 Internallink (uk.nhs.digital.website.beans.Internallink)1