contactInfo.setAddressState((String) contact.get("StateOrProvince")); contactInfo.setAddressPostalCode((String) contact.get("PostCode")); info.setContact(contactInfo);
@Test public void testGobalContactDefault() throws Exception { GeoServerInfo g1 = factory.createGlobal(); ContactInfo contact = factory.createContact(); g1.setContact(contact); ByteArrayOutputStream out = out(); persister.save(g1, out); ByteArrayInputStream in = in(out); Document dom = dom(in); Element e = (Element) dom.getElementsByTagName("contact").item(0); e.removeAttribute("class"); in = in(dom); GeoServerInfo g2 = persister.load(in, GeoServerInfo.class); assertEquals(g1, g2); }
g1.setContact(contact); contact.setAddress("123"); contact.setAddressCity("Victoria");
@Override public void onSubmit() { GeoServer gs = (GeoServer) geoServerModel.getObject(); GeoServerInfo global = gs.getGlobal(); global.setContact((ContactInfo) contactModel.getObject()); gs.save(global); doReturn(); } });
@Override public void onSubmit() { GeoServer gs = (GeoServer)geoServerModel.getObject(); GeoServerInfo global = gs.getGlobal(); global.setContact((ContactInfo)contactModel.getObject()); gs.save(global); doReturn(); } });
@Test public void testNoServiceContactInfo() throws Exception { // alter geoserver state so that there is no contact information getGeoServer().getGlobal().setContact(new ContactInfoImpl()); Document dom = getAsDOM(BASEPATH + "?request=GetCapabilities&service=WCS"); // print(dom); checkValidationErrors(dom, WCS11_SCHEMA); }