public void optionTablesOfx() throws FileNotFoundException, UtilsConfigurationException { Aht sldStyles = JaxbUtil.loadJAXB( seedUtil.getExtractName(DataSource.ide, DefaultGeoJsfSldStyle.class.getSimpleName()), Aht.class); Aht sldTypes = JaxbUtil.loadJAXB( seedUtil.getExtractName(DataSource.ide, DefaultGeoJsfSldType.class.getSimpleName()), Aht.class); table( sldStyles, null, "geojsf/sld/style", "src/main/resources/ofx.geojsf/geojsf/sld/table/style.xml", 15, 20, 30); table( sldTypes, null, "geojsf/sld/type", "src/main/resources/ofx.geojsf/geojsf/sld/table/type.xml", 15, 20, 30); }
@Test public void testOfx() throws FileNotFoundException, UtilsConfigurationException { Table actual = fOfx.toOfx(xmlStatus); saveXml(actual, fXml, false); Table expected = JaxbUtil.loadJAXB(fXml.getAbsolutePath(), Table.class); assertJaxbEquals(expected, actual); }
public static void main(String args[]) throws Exception { Configuration config = GeoJsfDocTestBootstrap.init(); config.setProperty(UtilsDocumentation.keyTranslationFile, "msg.geojsf/doc/ofx.xml"); config.setProperty(UtilsDocumentation.keyBaseLatexDir, "src/main/latex/common"); config.setProperty(UtilsDocumentation.keyBaseOfxDir, "src/main/resources/ofx.geojsf"); String dbSeedFile = config.getString("db.seed"); logger.debug("Using seed: " + dbSeedFile); Db dbSeed = JaxbUtil.loadJAXB(dbSeedFile, Db.class); Translations translations = JaxbUtil.loadJAXB( config.getString(UtilsDocumentation.keyTranslationFile), Translations.class); GeoJsfOfxDocumentation ofxDocumentan = new GeoJsfOfxDocumentation(config, dbSeed, translations); ofxDocumentan.optionTablesOfx(); }
@BeforeClass public static void initFiles() throws FileNotFoundException, ConfigurationException { fXml = new File(rootDir, "tableStatus.xml"); fTxt = new File(rootDir, "tableStatus.tex"); DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder(); config = builder.getConfiguration(false); config.setProperty(UtilsDocumentation.keyBaseLatexDir, "target"); translations = JaxbUtil.loadJAXB("data/xml/dummyTranslations.xml", Translations.class); }
private void test(boolean saveReference) throws FileNotFoundException, OfxInternalProcessingException { logger.debug(fTest.getAbsolutePath()); String wikiTxt = StringIO.loadTxt(fTest); Section section = wikiInline.toOfx(wikiTxt); if (saveReference) { JaxbUtil.save(fRef, section, true); } else { Section sectionRef = (Section) JaxbUtil.loadJAXB(fRef.getAbsolutePath(), Section.class); Assert.assertEquals(JaxbUtil.toString(sectionRef), JaxbUtil.toString(section)); } }
@Test public void xml() throws FileNotFoundException { Width actual = create(true); Width expected = JaxbUtil.loadJAXB(fXml.getAbsolutePath(), Width.class); assertJaxbEquals(expected, actual); }
@Test public void xmlTest() throws FileNotFoundException { Peer actual = create(true); Peer expected = JaxbUtil.loadJAXB(fXml.getAbsolutePath(), Peer.class); assertJaxbEquals(expected, actual); }
@Test public void testXml() throws FileNotFoundException { Type actual = create(true); Type expected = JaxbUtil.loadJAXB(fXml.getAbsolutePath(), Type.class); assertJaxbEquals(expected, actual); }
@Test public void testAclContainer() throws FileNotFoundException { Piece actual = create(true); Piece expected = JaxbUtil.loadJAXB(fXml.getAbsolutePath(), Piece.class); assertJaxbEquals(expected, actual); }
@Test public void testXml() throws FileNotFoundException { Capabilities actual = create(true); Capabilities expected = JaxbUtil.loadJAXB(fXml.getAbsolutePath(), Capabilities.class); assertJaxbEquals(expected, actual); }
@Test public void testAuth() throws FileNotFoundException { Paragraph actual = create(); Paragraph expected = JaxbUtil.loadJAXB(fXml.getAbsolutePath(), Paragraph.class); assertJaxbEquals(expected, actual); }
@BeforeClass public static void initCmp() throws FileNotFoundException { String fNameCmp = "src/test/resources/config/cmp/wiki.xml"; cmp = (Cmp) JaxbUtil.loadJAXB(fNameCmp, Cmp.class); }
@Test public void xml() throws FileNotFoundException { PubDate actual = create(); PubDate expected = JaxbUtil.loadJAXB(fXml.getAbsolutePath(), PubDate.class); assertJaxbEquals(expected, actual); }
@Test public void testAclContainer() throws FileNotFoundException { View actual = create(); View expected = JaxbUtil.loadJAXB(fXml.getAbsolutePath(), View.class); assertJaxbEquals(expected, actual); }