List of usage examples for org.apache.commons.jxpath JXPathContext newContext
public static JXPathContext newContext(Object contextBean)
From source file:org.xchain.namespaces.core.TestJXPathContext.java
@Before public void setUp() { // Create a parent context. parentContext = JXPathContext.newContext(new Object()); // Declare a test variable as false. parentContext.getVariables().declareVariable(TEST_VARIABLE_NAME, Boolean.FALSE); // Create a child context from the parent. childContext = JXPathContext.newContext(parentContext, new Object()); }
From source file:org.xchain.namespaces.core.TestWithCommand.java
@Before public void setUp() throws Exception { ChildObject child = new ChildObject("child"); ParentObject parent = new ParentObject(child); context = JXPathContext.newContext(parent); catalog = CatalogFactory.getInstance().getCatalog(CATALOG_URI); }
From source file:org.xchain.namespaces.csv.CsvXChainTestCase.java
protected JXPathContext createTestContext() { JXPathContext context = JXPathContext.newContext(new Object()); declareTestVariables(context); return context; }
From source file:org.xchain.namespaces.hibernate.test.TestCriteriaEntityPermission.java
@Before public void setupTest() throws Exception { // create the context. context = JXPathContext.newContext(new Object()); threadContext = new TestQualifiedEntityPermission.TestThreadContext(); ThreadLifecycle.getInstance().startThread(threadContext); }
From source file:org.xchain.namespaces.hibernate.test.TestDeleteCommand.java
@Before public void setupTest() throws Exception { // get the catalog. catalog = CatalogFactory.getInstance().getCatalog(catalogName); // create the context. context = JXPathContext.newContext(new Object()); }
From source file:org.xchain.namespaces.hibernate.test.TestQualifiedEntityPermission.java
@Before public void setupTest() throws Exception { // create the context. context = JXPathContext.newContext(new Object()); threadContext = new TestThreadContext(); ThreadLifecycle.getInstance().startThread(threadContext); }
From source file:org.xchain.namespaces.hibernate.test.TestSessionCommand.java
@Before public void setUp() throws Exception { Lifecycle.startLifecycle();// www .j av a2s . co m // get the catalog. catalog = CatalogFactory.getInstance().getCatalog( "resource://context-class-loader/org/xchain/namespaces/hibernate/test-session-command.xchain"); // create the context. context = JXPathContext.newContext(new Object()); }
From source file:org.xchain.namespaces.hibernate.test.TestTransactionCommand.java
@Before public void setUp() throws Exception { Lifecycle.startLifecycle();//from w w w . jav a2 s . c om // get the catalog. catalog = CatalogFactory.getInstance().getCatalog( "resource://context-class-loader/org/xchain/namespaces/hibernate/test-transaction-command.xchain"); // create the context. context = JXPathContext.newContext(new Object()); }
From source file:org.xchain.namespaces.hibernate.test.TestValidateCommand.java
@Before public void setUp() throws Exception { Lifecycle.startLifecycle();/* w w w . j a v a 2s . co m*/ // get the catalog. catalog = CatalogFactory.getInstance().getCatalog( "resource://context-class-loader/org/xchain/namespaces/hibernate/test-validate-command.xchain"); // create the context. context = JXPathContext.newContext(new Object()); }
From source file:org.xchain.namespaces.jsl.BaseTestSaxEvents.java
@Before public void setUp() throws Exception { context = JXPathContext.newContext(createContextObject()); recorder = new SaxEventRecorder(); result = new SAXResult(recorder); context.getVariables().declareVariable("result", result); context.getVariables().declareVariable("executed", Boolean.FALSE); catalog = CatalogFactory.getInstance().getCatalog(catalogUri); }