use of com.epam.ta.reportportal.ws.model.ParameterResource in project service-api by reportportal.
the class ParametersConverterTest method toResource.
@Test
void toResource() {
final Parameter parameter = getParameter();
final ParameterResource resource = ParametersConverter.TO_RESOURCE.apply(parameter);
assertEquals(resource.getKey(), parameter.getKey());
assertEquals(resource.getValue(), parameter.getValue());
}
use of com.epam.ta.reportportal.ws.model.ParameterResource in project service-api by reportportal.
the class ParametersConverterTest method toModel.
@Test
void toModel() {
final ParameterResource resource = getResource();
final Parameter parameter = ParametersConverter.TO_MODEL.apply(resource);
assertEquals(parameter.getKey(), resource.getKey());
assertEquals(parameter.getValue(), resource.getValue());
}
use of com.epam.ta.reportportal.ws.model.ParameterResource in project agent-java-testNG by reportportal.
the class ParametersBypassTest method verify_null_parameter.
private static void verify_null_parameter(List<StartTestItemRQ> methodStarts) {
assertThat(methodStarts, hasSize(3));
String strClassName = String.class.getCanonicalName();
List<String> expectedKeys = Collections.nCopies(3, strClassName);
List<String> expectedValues = Arrays.asList("one", "two", "NULL");
List<String> expectedResult = IntStream.range(0, 3).mapToObj(i -> expectedKeys.get(i) + "-" + expectedValues.get(i)).collect(Collectors.toList());
IntStream.range(0, 3).forEach(i -> {
List<ParameterResource> params = methodStarts.get(i).getParameters();
assertThat(params, hasSize(1));
ParameterResource param = params.get(0);
assertThat(expectedResult, hasItem(param.getKey() + "-" + param.getValue()));
});
}
Aggregations