From aeb015614ea72c94e6234b855d18fd3fc240dfce Mon Sep 17 00:00:00 2001 From: Dominik Remo <47261058+DominikRemo@users.noreply.github.com> Date: Fri, 20 Oct 2023 16:40:58 +0200 Subject: [PATCH] Add JavaDocs to Organization- Factory & UtilService --- .../organization/OrganizationFactory.java | 16 ++++++++-------- .../organization/OrganizationUtilService.java | 16 ++++++++++++++++ 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/test/java/de/tum/in/www1/artemis/organization/OrganizationFactory.java b/src/test/java/de/tum/in/www1/artemis/organization/OrganizationFactory.java index a873e0e8c3e9..80e01a2638d3 100644 --- a/src/test/java/de/tum/in/www1/artemis/organization/OrganizationFactory.java +++ b/src/test/java/de/tum/in/www1/artemis/organization/OrganizationFactory.java @@ -8,15 +8,15 @@ public class OrganizationFactory { /** - * Generate an example organization entity + * Generates an Organization. * - * @param name of organization - * @param shortName of organization - * @param url of organization - * @param description of organization - * @param logoUrl of organization - * @param emailPattern of organization - * @return An organization entity + * @param name The name of the Organization + * @param shortName The short name of the Organization + * @param url The url of the Organization + * @param description The description of the Organization + * @param logoUrl The url to the logo of the Organization + * @param emailPattern The email pattern of the Organization + * @return The generated Organization */ public static Organization generateOrganization(String name, String shortName, String url, String description, String logoUrl, String emailPattern) { Organization organization = new Organization(); diff --git a/src/test/java/de/tum/in/www1/artemis/organization/OrganizationUtilService.java b/src/test/java/de/tum/in/www1/artemis/organization/OrganizationUtilService.java index ecf4d7c36186..75b6ecf595e1 100644 --- a/src/test/java/de/tum/in/www1/artemis/organization/OrganizationUtilService.java +++ b/src/test/java/de/tum/in/www1/artemis/organization/OrganizationUtilService.java @@ -17,11 +17,27 @@ public class OrganizationUtilService { @Autowired private OrganizationRepository organizationRepository; + /** + * Creates and saves an Organization with the given parameters. + * + * @param name The name of the Organization + * @param shortName The short name of the Organization + * @param url The url of the Organization + * @param description The description of the Organization + * @param logoUrl The url to the logo of the Organization + * @param emailPattern The email pattern of the Organization + * @return The created Organization + */ public Organization createOrganization(String name, String shortName, String url, String description, String logoUrl, String emailPattern) { Organization organization = OrganizationFactory.generateOrganization(name, shortName, url, description, logoUrl, emailPattern); return organizationRepository.save(organization); } + /** + * Creates and saves an Organization with random parameters. + * + * @return The created Organization + */ public Organization createOrganization() { return createOrganization(UUID.randomUUID().toString().replace("-", ""), UUID.randomUUID().toString().replace("-", ""), UUID.randomUUID().toString().replace("-", ""), UUID.randomUUID().toString().replace("-", ""), null, "^.*@matching.*$");