Package org.milyn.scribe.invoker

Examples of org.milyn.scribe.invoker.AnnotatedDaoInvoker.lookup()


    DaoInvoker invoker = new AnnotatedDaoInvoker(fullDao, fullDaoRuntimeInfo);

    Map<String, Object> params = new HashMap<String, Object>();
    params.put("id", 1L);

    invoker.lookup("id", params);

    verify(fullDao).findById(1L);

  }
View Full Code Here


  public void test_lookup_with_method_name() {

    DaoInvoker invoker = new AnnotatedDaoInvoker(fullDao, fullDaoRuntimeInfo);

    invoker.lookup("findBy", "param");

    verify(fullDao).findBy(eq("param"));
  }

  public void test_lookup_with_name_param() {
View Full Code Here

    Map<String, Object> param = new HashMap<String, Object>();
    param.put("first", "henk");
    param.put("last", "janssen");

    invoker.lookup("name", param);

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

  public void test_lookup_with_positional_param() {
View Full Code Here

  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());

  }

  public void test_lookupByQuery_map_params() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.