use of org.springframework.boot.actuate.endpoint.invoke.OperationParameter in project spring-boot by spring-projects.
the class OperationMethodParametersTests method assertParameters.
private void assertParameters(Stream<OperationParameter> stream) {
List<OperationParameter> parameters = stream.collect(Collectors.toList());
assertThat(parameters).hasSize(1);
OperationParameter parameter = parameters.get(0);
assertThat(parameter.getName()).isEqualTo("name");
assertThat(parameter.getType()).isEqualTo(String.class);
}
use of org.springframework.boot.actuate.endpoint.invoke.OperationParameter in project spring-boot by spring-projects.
the class OperationMethodParametersTests method iteratorShouldIterateOperationParameters.
@Test
void iteratorShouldIterateOperationParameters() {
OperationMethodParameters parameters = new OperationMethodParameters(this.exampleMethod, new DefaultParameterNameDiscoverer());
Iterator<OperationParameter> iterator = parameters.iterator();
assertParameters(StreamSupport.stream(Spliterators.spliteratorUnknownSize(iterator, Spliterator.ORDERED), false));
}
Aggregations