Package org.milyn.delivery.sax

Examples of org.milyn.delivery.sax.MockVisitBefore


    test_01(FilterSettings.DEFAULT_SAX);
  }
 
  public void test_01(FilterSettings filterSettings) {
    Smooks smooks = new Smooks();   
    MockVisitBefore visitor = new MockVisitBefore();
   
    smooks.setFilterSettings(filterSettings);
   
    smooks.addVisitor(visitor, "order-item/*");   
    smooks.filterSource(new StreamSource(getClass().getResourceAsStream("order.xml")));
   
    assertEquals("[product, quantity, price]", visitor.getElements().toString());
  }
View Full Code Here


    test_02(FilterSettings.DEFAULT_SAX);
  }
 
  public void test_02(FilterSettings filterSettings) {
    Smooks smooks = new Smooks();   
    MockVisitBefore visitor1 = new MockVisitBefore();
    MockVisitBefore visitor2 = new MockVisitBefore();
   
    smooks.setFilterSettings(filterSettings);

    smooks.addVisitor(visitor1, "order-item/*");
    smooks.addVisitor(visitor2, "order-item/price");
   
    smooks.filterSource(new StreamSource(getClass().getResourceAsStream("order.xml")));
   
    assertEquals("[product, quantity, price]", visitor1.getElements().toString());
    assertEquals("[price]", visitor2.getElements().toString());
  }
View Full Code Here

TOP

Related Classes of org.milyn.delivery.sax.MockVisitBefore

Copyright © 2018 www.massapicom. 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.