use of io.scalecube.services.CommunicationMode in project scalecube by scalecube.
the class ReflectTest method testCommunicationMode.
/**
* Test communication mode.
*
* @param methodName method name
* @param expectedMode expected mode
*/
@ParameterizedTest
@MethodSource("argsCommunicationModeProvider")
public void testCommunicationMode(String methodName, CommunicationMode expectedMode) {
// Given:
Method m = Arrays.stream(TestService.class.getMethods()).filter(meth -> meth.getName().equals(methodName)).findFirst().get();
// When:
CommunicationMode communicationMode = Reflect.communicationMode(m);
// Then:
Assertions.assertEquals(expectedMode, communicationMode, "Invalid communicationMode");
}
Aggregations