Esempio n. 1
0
  public void testViewList() {
    startTest();

    IPentahoUrlFactory urlFactory = new SimpleUrlFactory(""); // $NON-NLS-1$

    PMDUIComponent component = new PMDUIComponent(urlFactory, new ArrayList());
    StandaloneSession session =
        new StandaloneSession(Messages.getString("BaseTest.DEBUG_JUNIT_SESSION")); // $NON-NLS-1$
    component.validate(session, null);
    component.setAction(PMDUIComponent.ACTION_LIST_MODELS);

    Document doc = component.getXmlContent();
    System.out.println(doc.asXML());
    try {
      OutputStream outputStream =
          getOutputStream("MetadataTest.testViewList", ".xml"); // $NON-NLS-1$//$NON-NLS-2$
      outputStream.write(doc.asXML().getBytes());
    } catch (IOException e) {
    }
    finishTest();
  }
Esempio n. 2
0
  public void __testLookup() {
    startTest();

    IPentahoUrlFactory urlFactory = new SimpleUrlFactory(""); // $NON-NLS-1$

    PMDUIComponent component = new PMDUIComponent(urlFactory, new ArrayList());
    StandaloneSession session =
        new StandaloneSession(Messages.getString("BaseTest.DEBUG_JUNIT_SESSION")); // $NON-NLS-1$
    component.validate(session, null);
    component.setAction(PMDUIComponent.ACTION_LOOKUP);
    component.setDomainName("test"); // $NON-NLS-1$
    component.setModelId("Orders"); // $NON-NLS-1$
    component.setColumnId("BC_CUSTOMERS_CUSTOMERNAME"); // $NON-NLS-1$

    Document doc = component.getXmlContent();
    System.out.println(doc.asXML());
    try {
      OutputStream outputStream =
          getOutputStream("MetadataTest.testLoadView", ".xml"); // $NON-NLS-1$//$NON-NLS-2$
      outputStream.write(doc.asXML().getBytes());
    } catch (IOException e) {
    }
    finishTest();
  }