use of org.springframework.data.type.MethodsMetadata in project spring-data-commons by spring-projects.
the class DefaultMethodsMetadataReaderUnitTests method shouldReadClassMethods.
// DATACMNS-1206
@Test
void shouldReadClassMethods() throws IOException {
MethodsMetadata metadata = getMethodsMetadata(Foo.class);
assertThat(metadata.getMethods()).hasSize(3);
Iterator<MethodMetadata> iterator = metadata.getMethods().iterator();
assertThat(iterator.next().getMethodName()).isEqualTo("one");
assertThat(iterator.next().getMethodName()).isEqualTo("two");
assertThat(iterator.next().getMethodName()).isEqualTo("three");
}
use of org.springframework.data.type.MethodsMetadata in project spring-data-commons by spring-projects.
the class DefaultMethodsMetadataReaderUnitTests method shouldReturnMethodMetadataByName.
// DATACMNS-1206
@Test
void shouldReturnMethodMetadataByName() throws IOException {
MethodsMetadata metadata = getMethodsMetadata(Foo.class);
assertThat(metadata.getMethods()).hasSize(3);
assertThat(metadata.getMethods("one")).extracting(MethodMetadata::getMethodName).contains("one");
assertThat(metadata.getMethods("foo")).isEmpty();
}
use of org.springframework.data.type.MethodsMetadata in project spring-data-commons by spring-projects.
the class DefaultMethodsMetadataReaderUnitTests method shouldReadInterfaceMethods.
// DATACMNS-1206
@Test
void shouldReadInterfaceMethods() throws IOException {
MethodsMetadata metadata = getMethodsMetadata(Baz.class);
assertThat(metadata.getMethods()).hasSize(3);
Iterator<MethodMetadata> iterator = metadata.getMethods().iterator();
assertThat(iterator.next().getMethodName()).isEqualTo("one");
assertThat(iterator.next().getMethodName()).isEqualTo("two");
assertThat(iterator.next().getMethodName()).isEqualTo("three");
}
Aggregations