package div;
-import java.util.List;
+import java.util.*;
public class Main {
private void method(String s) throws Exception {
}
public void generated_5008769909842074787(List<String> categories, List<String> selectedCategories) {
}
+ public Map<String, String> generated_9203691974776793760(String dialog) {
+ return new HashMap<String,String>();
+ }
}
\ No newline at end of file
assertThat("Method exists", methodSimpleSignature.exists());
}
-
+ @Test
+ public void testFindMethod_bug_MultiSortMembersAction() throws Exception {
+ IMethod method = getTestDataMethod("generated_9203691974776793760", "QString;");
+ assertThat(method.exists());
+
+ String simpleSignature = "public Map<String,String> generated_9203691974776793760(String dialog)";
+ IProject project = ExampleCodeManager.INSTANCE.getProject();
+ IMethod methodSimpleSignature = RefaktorHandleUtils.findMethodHandle(project, "div.Main", simpleSignature);
+ assertThat("Method exists", methodSimpleSignature.exists());
+ }
private IMethod getTestDataMethod(String methodName, String... parameters) {
return RefaktorHandleUtils.findMethodHandleChecked(ExampleCodeManager.INSTANCE.getProject(), "div", "Main", methodName, parameters);
}
private static String normalizeSimpleSignature(String simpleSignature) {
- return simpleSignature.replaceAll("\\s+", " ").replaceAll("\\s*\\(\\s*", "(").replaceAll("\\s+\\)", ")").replaceAll("\\s+,", ",");
+ return simpleSignature.replaceAll("\\s+", " ").replaceAll("\\s*\\(\\s*", "(").replaceAll("\\s+\\)", ")").replaceAll("\\s*,\\s*", ",");
}
}