public Link withName(String value) { setName(value); return this; }
public Link withName(String value) { setName(value); return this; }
/** * @deprecated use set method */ @Deprecated public Link withName(final String value) { return setName(value); }
@SuppressWarnings("PMD.UseObjectForClearerAPI") public static Link createLink(final String value, final String name, final String url, final String type) { final String resolvedName = firstNonEmpty(value).orElse(name); final String resolvedUrl = firstNonEmpty(url) .orElseGet(() -> getLinkUrl(resolvedName, type)); return new Link() .setName(resolvedName) .setUrl(resolvedUrl) .setType(type); }
/** * Adds link to current test or step (or fixture) if any. Takes no effect * if no test run at the moment. * * @param name the name of link. * @param type the type of link, used to display link icon in the report. * @param url the link's url. */ public static void link(final String name, final String type, final String url) { final Link link = new Link().setName(name).setType(type).setUrl(url); getLifecycle().updateTestCase(testResult -> testResult.getLinks().add(link)); }