Example #1
0
  @Test
  public void testStaticStr1() throws JAXBException, IOException {
    JAXBElement<?> jaxb =
        (JAXBElement<?>)
            _ds.unmarshal(
                JarTestResourceUtils.readDemoFileAsStream("test/static_test_str1.xml", _ds_cfg));

    DataSetDescr dsd = (DataSetDescr) jaxb.getValue();

    SortGroup sg = dsd.getSortByGrp();
    assertNotNull(sg);
    assertEquals(1, sg.getSortBy().size());
  }
Example #2
0
  @Test
  public void testDs() throws JAXBException, IOException {

    String[] flist = new String[] {LocalTestConstants.DS_XML, LocalTestConstants.DS_EMPTY_XML};

    HashMap<String, DataSetDescr> dmap = new HashMap<String, DataSetDescr>();

    for (String fname : flist) {
      JAXBElement<?> jaxb =
          (JAXBElement<?>) _ds.unmarshal(JarTestResourceUtils.readDemoFileAsStream(fname, _ds_cfg));
      dmap.put(fname, (DataSetDescr) jaxb.getValue());
    }

    checkDataSetDescrPartial(dmap.get(LocalTestConstants.DS_EMPTY_XML));
    checkDataSetDescrFull(dmap.get(LocalTestConstants.DS_XML));
  }
Example #3
0
  @Test
  public void testStaticLangDs() throws JAXBException, IOException {
    JAXBElement<?> jaxb =
        (JAXBElement<?>)
            _ds.unmarshal(
                JarTestResourceUtils.readDemoFileAsStream("test/static_test_lmap.xml", _ds_cfg));

    DataSetDescr dsd = (DataSetDescr) jaxb.getValue();

    StaticData sdf = dsd.getStaticData();
    assertEquals(1, sdf.getColumns().getColumn().size());
    assertEquals(2, sdf.getStaticRows().getRow().size());

    LangMap lm = dsd.getLangMap();
    assertNotNull(lm);
    assertEquals(1, lm.getColumn().size());
  }