Examples of Flights


Examples of org.springframework.oxm.jaxb.test.Flights

  @Override
  protected Object createFlights() {
    FlightType flight = new FlightType();
    flight.setNumber(42L);
    flights = new Flights();
    flights.getFlight().add(flight);
    return flights;
  }
View Full Code Here

Examples of org.springframework.oxm.jaxb.test.Flights

  public void marshalInvalidClass() throws Exception {
    Jaxb2Marshaller marshaller = new Jaxb2Marshaller();
    marshaller.setClassesToBeBound(FlightType.class);
    marshaller.afterPropertiesSet();
    Result result = new StreamResult(new StringWriter());
    Flights flights = new Flights();
    marshaller.marshal(flights, result);
  }
View Full Code Here

Examples of org.springframework.oxm.jaxb.test.Flights

    assertNotNull("datahandler property not set", object.getSwaDataHandler());
  }

  @Override
  protected void testFlights(Object o) {
    Flights flights = (Flights) o;
    assertNotNull("Flights is null", flights);
    assertEquals("Invalid amount of flight elements", 1, flights.getFlight().size());
    testFlight(flights.getFlight().get(0));
  }
View Full Code Here

Examples of org.springframework.oxm.jaxb.test.Flights

  @Test
  public void unmarshalFile() throws IOException {
    Resource resource = new ClassPathResource("jaxb2.xml", getClass());
    File file = resource.getFile();

    Flights f = (Flights) unmarshaller.unmarshal(new StreamSource(file));
    testFlights(f);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.