Search in sources :

Example 11 with Flight

use of org.glassfish.jersey.examples.flight.model.Flight in project jersey by jersey.

the class FlightsDemoAppTest method _testOpenFlights.

public void _testOpenFlights(String acceptType) {
    final List<Flight> flights = target("flights/open").request(acceptType).get(new GenericType<List<Flight>>() {
    });
    for (Flight flight : flights) {
        assertNotNull("Flight id", flight.getId());
        assertFalse("Flight id empty", flight.getId().isEmpty());
        assertFalse("Aircraft not assigned to flight", flight.getAircraft().isAvailable());
        assertTrue("Flight not open", flight.isOpen());
    }
}
Also used : Flight(org.glassfish.jersey.examples.flight.model.Flight) List(java.util.List)

Aggregations

Flight (org.glassfish.jersey.examples.flight.model.Flight)11 RolesAllowed (javax.annotation.security.RolesAllowed)4 BadRequestException (javax.ws.rs.BadRequestException)4 Path (javax.ws.rs.Path)4 Produces (javax.ws.rs.Produces)4 Aircraft (org.glassfish.jersey.examples.flight.model.Aircraft)4 List (java.util.List)3 POST (javax.ws.rs.POST)3 Consumes (javax.ws.rs.Consumes)2 DELETE (javax.ws.rs.DELETE)2 ArrayList (java.util.ArrayList)1 LinkedList (java.util.LinkedList)1 Form (javax.ws.rs.core.Form)1 Detail (org.glassfish.jersey.examples.flight.filtering.Detail)1