Package org.milyn.scribe.invoker

Examples of org.milyn.scribe.invoker.AnnotatedDaoInvoker


    verify(fullDao).findByName(eq("janssen"), eq("henk"));
  }

  public void test_lookup_with_positional_param() {

    DaoInvoker invoker = new AnnotatedDaoInvoker(fullDao, fullDaoRuntimeInfo);

    invoker.lookup("positional", "param1", 2, true);

    verify(fullDao).findBySomething(eq("param1"), eq(2), eq(true));
  }
View Full Code Here



  @Test(expectedExceptions = NoMethodWithAnnotationFoundException.class)
  public void test_lookup_no_annotation() {

    DaoInvoker invoker = new AnnotatedDaoInvoker(minimumDao, minimumDaoRuntimeInfo);

    invoker.lookup("id", Collections.emptyMap());

  }
View Full Code Here

  }

  public void test_lookupByQuery_map_params() {

    DaoInvoker invoker = new AnnotatedDaoInvoker(fullDao, fullDaoRuntimeInfo);

    Map<String, Object> params = new HashMap<String, Object>();

    invoker.lookupByQuery("query", params);

    verify(fullDao).findByQuery(eq("query"), same(params));

  }
View Full Code Here

  }

  public void test_lookupByQuery_array_params() {

    DaoInvoker invoker = new AnnotatedDaoInvoker(fullDao, fullDaoRuntimeInfo);

    Object[] params = new Object[0];

    invoker.lookupByQuery("query", params);

    verify(fullDao).findByQuery(eq("query"), same(params));

  }
View Full Code Here

  }

  @Test(expectedExceptions = NoMethodWithAnnotationFoundException.class)
  public void test_lookupByQuery_non_query_finder_dao_map_params() {

    DaoInvoker invoker = new AnnotatedDaoInvoker(minimumDao, minimumDaoRuntimeInfo);

    Map<String, Object> params = new HashMap<String, Object>();

    invoker.lookupByQuery("id", params);

  }
View Full Code Here

  }

  @Test(expectedExceptions = NoMethodWithAnnotationFoundException.class)
  public void test_lookupByQuery_non_query_finder_dao_array_params() {

    DaoInvoker invoker = new AnnotatedDaoInvoker(minimumDao, minimumDaoRuntimeInfo);

    Object[] params = new Object[0];

    invoker.lookupByQuery("id", params);

  }
View Full Code Here

TOP

Related Classes of org.milyn.scribe.invoker.AnnotatedDaoInvoker

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.