package ru.yandex.qatools.allure.aspects;

import java.text.MessageFormat;

/**
 * @author Dmitry Baev charlie@yandex-team.ru
 *         Date: 24.10.13
 */
public final class AllureAspectUtils {
    private AllureAspectUtils() {
    }

    public static String getTitle(String namePattern, String methodName, Object[] parameters) {
        String finalPattern = namePattern.replaceAll("\\{method\\}", methodName);
        return MessageFormat.format(finalPattern, parameters);
    }
}

@@ -67,16 +67,67 @@
 eFormat;
+%0Aimport java.util.Arrays;%0Aimport java.util.Objects;
 %0A%0A/**%0A *
@@ -470,62 +470,1716 @@
     
-return MessageFormat.format(finalPattern, parameters);
+Object%5B%5D results = new Object%5Bparameters.length%5D;%0A        for (int i = 0; i %3C parameters.length; i++)%7B%0A            results%5Bi%5D = checkForArray(parameters%5Bi%5D);%0A        %7D%0A        return MessageFormat.format(finalPattern, results);%0A    %7D%0A%0A    private static Object checkForArray(Object obj) %7B%0A        if (obj instanceof Object%5B%5D) %7B%0A            return Arrays.toString((Object%5B%5D)obj);%0A        %7D else %7B%0A            if (obj instanceof byte%5B%5D) %7B%0A                return Arrays.toString((byte%5B%5D)obj);%0A            %7D else %7B%0A                if (obj instanceof short%5B%5D) %7B%0A                    return Arrays.toString((short%5B%5D)obj);%0A                %7D else %7B%0A                    if (obj instanceof int%5B%5D) %7B%0A                        return Arrays.toString((int%5B%5D)obj);%0A                    %7D else %7B%0A                        if (obj instanceof long%5B%5D) %7B%0A                            return Arrays.toString((long%5B%5D)obj);%0A                        %7D else %7B%0A                            if (obj instanceof float%5B%5D) %7B%0A                                return Arrays.toString((float%5B%5D)obj);%0A                            %7D else %7B%0A                                if (obj instanceof double%5B%5D) %7B%0A                                    return Arrays.toString((double%5B%5D)obj);%0A                                %7D else %7B%0A                                    if (obj instanceof boolean%5B%5D) %7B%0A                                        return Arrays.toString((boolean%5B%5D)obj);%0A                                    %7D else %7B%0A                                        return obj;%0A                                    %7D%0A                                %7D%0A                            %7D%0A                        %7D%0A                    %7D%0A                %7D%0A            %7D%0A        %7D
 %0A   

fix - Fix the getTitle method: print arrays of objects and primitives with Arrays.toString()