Search in sources :

Example 1 with QueryContext

use of com.developmentontheedge.sql.format.QueryContext in project be5 by DevelopmentOnTheEdge.

the class BasicQueryContextTest method testBuilder.

@Test
public void testBuilder() {
    QueryContext context = new BasicQueryContext.Builder().parameter("foo", "bar").sessionVar("var", "value").build();
    assertEquals("bar", context.getParameter("foo"));
    assertEquals("value", context.getSessionVariable("var"));
    assertNull(context.getSessionVariable("test"));
}
Also used : BasicQueryContext(com.developmentontheedge.sql.format.BasicQueryContext) QueryContext(com.developmentontheedge.sql.format.QueryContext) BasicQueryContext(com.developmentontheedge.sql.format.BasicQueryContext) Test(org.junit.Test)

Aggregations

BasicQueryContext (com.developmentontheedge.sql.format.BasicQueryContext)1 QueryContext (com.developmentontheedge.sql.format.QueryContext)1 Test (org.junit.Test)1