From ed6cc269309ada2fdb928b4628228f93e587c7f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iulia=20Burc=C4=83?= Date: Wed, 31 Mar 2021 11:08:59 +0300 Subject: [PATCH] Update wrong methods (#6882) * Update wrong methods * tslint fix * change back to StringUtil --- lib/testing/src/lib/core/utils/string.util.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/testing/src/lib/core/utils/string.util.ts b/lib/testing/src/lib/core/utils/string.util.ts index aa39a5d49b..b4f915c46a 100644 --- a/lib/testing/src/lib/core/utils/string.util.ts +++ b/lib/testing/src/lib/core/utils/string.util.ts @@ -107,18 +107,20 @@ export class StringUtil { return fileNames; } - /** - * Generates a random name for a process + /** Generates a random name for a process + * + * @param length {int} If this parameter is not provided the length is set to 5 by default. */ - static generateProcessName(): string { - return 'process_' + StringUtil.generateRandomString(5); + static generateProcessName(length: number = 5): string { + return 'process_' + StringUtil.generateRandomString(length); } - /** - * Generates a random name for a task + /** Generates a random name for a process + * + * @param length {int} If this parameter is not provided the length is set to 5 by default. */ - static generateUserTaskName(): string { - return 'userTask_' + StringUtil.generateRandomString(5); + static generateUserTaskName(length: number = 5): string { + return 'userTask_' + StringUtil.generateRandomString(length); } }