use of io.github.asw.i3a.operatorsWebClient.entitites.Operator in project InciDashboard_i3a by Arquisoft.
the class OperatorService method getAllOperators.
public static List<Operator> getAllOperators() {
try {
HttpResponse<JsonNode> response = Unirest.post(API_GATEWAY + "/operators").asJson();
ObjectMapper mapper = new ObjectMapper();
List<Operator> items = mapper.readValue(response.getBody().toString(), mapper.getTypeFactory().constructParametricType(List.class, Operator.class));
return items;
} catch (IOException | UnirestException e) {
e.printStackTrace();
return null;
}
}
use of io.github.asw.i3a.operatorsWebClient.entitites.Operator in project InciDashboard_i3a by Arquisoft.
the class OperatorTest method extraTest.
@Test
public void extraTest() {
Operator op = new Operator("Pepe@gmail.com", "123456");
assertTrue(op.getEmail().equals("Pepe@gmail.com"));
assertTrue(op.getPassword().equals("123456"));
Operator op2 = new Operator();
assertTrue(op.canEquals(op2));
}
Aggregations