Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

import org.apache.dubbo.common.utils.ClassUtils;

import java.util.Arrays;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
Expand Down Expand Up @@ -179,9 +181,14 @@ void test_getDeclaredMethodNames_ContainExtendsParentMethods() throws Exception

@Test
void test_getMethodNames_ContainExtendsParentMethods() throws Exception {
assertArrayEquals(
new String[] {"hello", "world"}, Wrapper.getWrapper(Son.class).getMethodNames());
assertArrayEquals(new String[] {"hello", "world"}, ClassUtils.getMethodNames(Son.class));
String[] methodNamesFromWrapepr = Wrapper.getWrapper(Son.class).getMethodNames();
String[] methodNamesFromClassUtils = ClassUtils.getMethodNames(Son.class);

Arrays.sort(methodNamesFromWrapepr);
Arrays.sort(methodNamesFromClassUtils);

assertArrayEquals(new String[] {"hello", "world"}, methodNamesFromWrapepr);
assertArrayEquals(new String[] {"hello", "world"}, methodNamesFromClassUtils);
}

@Test
Expand Down
Loading