Package org.milyn.scribe.invoker

Examples of org.milyn.scribe.invoker.InterfaceDaoInvoker


  private Dao<Object> minimumDao;

  @Test(groups = "unit")
  public void test_insert() {

    DaoInvoker invoker = new InterfaceDaoInvoker(fullDao);

    Object toPersist = new Object();

    invoker.insert(toPersist);

    verify(fullDao).insert(same(toPersist));

  }
View Full Code Here


  }

  public void test_insert_named() {

    DaoInvoker invoker = new InterfaceDaoInvoker(fullDao);

    Object toPersist = new Object();

    invoker.insert("myInsert", toPersist);

    verify(fullDao).insert(eq("myInsert"), same(toPersist));

  }
View Full Code Here

  }

  public void test_update() {


    DaoInvoker invoker = new InterfaceDaoInvoker(fullDao);

    Object toMerge = new Object();

    invoker.update(toMerge);

    verify(fullDao).update(same(toMerge));

  }
View Full Code Here


  public void test_update_named() {


    DaoInvoker invoker = new InterfaceDaoInvoker(fullDao);

    Object toMerge = new Object();

    invoker.update("myMerge", toMerge);

    verify(fullDao).update(eq("myMerge") ,same(toMerge));

  }
View Full Code Here

  }

  public void test_delete() {


    DaoInvoker invoker = new InterfaceDaoInvoker(fullDao);

    Object toDelete = new Object();

    invoker.delete(toDelete);

    verify(fullDao).delete(same(toDelete));

  }
View Full Code Here

  }

  public void test_delete_named() {


    DaoInvoker invoker = new InterfaceDaoInvoker(fullDao);

    Object toDelete = new Object();

    invoker.delete("myDelete", toDelete);

    verify(fullDao).delete(eq("myDelete"), same(toDelete));

  }
View Full Code Here

  }

  public void test_flush() {

    DaoInvoker invoker = new InterfaceDaoInvoker(fullDao);

    invoker.flush();

    verify(fullDao).flush();

  }
View Full Code Here

  }

  @Test(expectedExceptions = UnsupportedOperationException.class)
  public void test_flush_non_flushable_dao() {

    DaoInvoker invoker = new InterfaceDaoInvoker(minimumDao);

    invoker.flush();

  }
View Full Code Here

  }

  public void test_lookup() {

    DaoInvoker invoker = new InterfaceDaoInvoker(fullDao);

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

    invoker.lookup("id", params);

    verify(fullDao).lookup(eq("id"), same(params));

  }
View Full Code Here


  @Test(expectedExceptions = UnsupportedOperationException.class)
  public void test_findBy_non_finder_dao() {

    DaoInvoker invoker = new InterfaceDaoInvoker(minimumDao);

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

    invoker.lookup("id", params);

  }
View Full Code Here

TOP

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

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.