test_class.file: dal-jdbc/src/test/java/org/unidal/dal/jdbc/query/token/resolver/InTokenResolverTest.java
test_class.identifier: InTokenResolverTest
test_class.superclass: extends AbstractTokenResolverTest
test_case.body: @Test
     public void testInEmptyArrayParameter() throws Exception {
        QueryDef query = new QueryDef("test", UserEntity.class, QueryType.SELECT, "<IN>${user-id-array}</IN>");
        User user = new User();
        QueryContext ctx = getSelectContext(query, user, null);
  
        user.setUserIdArray(new long[0]);
        Assert.assertEquals(false, ctx.isWithinInToken());
        m_queryResolver.resolve(ctx);
        Assert.assertEquals("(null)", ctx.getSqlStatement());
        Assert.assertEquals(0, ctx.getParameters().size());
        Assert.assertEquals(false, ctx.isWithinInToken());
     }
test_case.class_method_signature: InTokenResolverTest.testInEmptyArrayParameter()
test_case.full_signature: @Test public void testInEmptyArrayParameter()
test_case.identifier: testInEmptyArrayParameter
test_case.invocations: getSelectContext setUserIdArray assertEquals isWithinInToken resolve assertEquals getSqlStatement assertEquals size getParameters assertEquals isWithinInToken
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testInEmptyArrayParameter()
focal_class.file: dal-jdbc/src/main/java/org/unidal/dal/jdbc/query/token/resolver/InTokenResolver.java
focal_class.identifier: InTokenResolver
focal_class.interfaces: implements TokenResolver
focal_class.class_method_signature: InTokenResolver.resolve(Token token, QueryContext ctx)
focal_class.full_signature: public String resolve(Token token, QueryContext ctx)
focal_class.identifier: resolve
focal_class.modifiers: public
focal_class.parameters: (Token token, QueryContext ctx)
focal_class.return: String
focal_class.signature: String resolve(Token token, QueryContext ctx)
focal_method.body: public String resolve(Token token, QueryContext ctx) {
        if (token.getType() != TokenType.IN) {
           throw new DalRuntimeException("Internal error: only IN token is supported by " + getClass());
        }
  
        if (token instanceof StartTagToken) {
           if (ctx.isWithinInToken()) {
              throw new DalRuntimeException("IN token can't be nested");
           }
  
           ctx.setWithinInToken(true);
           return "(";
        } else if (token instanceof EndTagToken) {
           ctx.setWithinInToken(false);
           return ")";
        } else {
           throw new DalRuntimeException("Internal error: IN token can only be used as <IN> or </IN>");
        }
     }
focal_method.class_method_signature: InTokenResolver.resolve(Token token, QueryContext ctx)
focal_method.full_signature: public String resolve(Token token, QueryContext ctx)
focal_method.identifier: resolve
focal_method.invocations: getType getClass isWithinInToken setWithinInToken setWithinInToken
focal_method.modifiers: public
focal_method.parameters: (Token token, QueryContext ctx)
focal_method.return: String
focal_method.signature: String resolve(Token token, QueryContext ctx)