All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.ebean.mocker.DelegateAwareEbeanServer Maven / Gradle / Ivy

package io.ebean.mocker;

import io.ebean.Database;

/**
 * Test EbeanServer implementations that want to delegate some functionality
 * through to a fully functional EbeanServer (that is typically using a test db like h2)
 */
public interface DelegateAwareEbeanServer {

  /**
   * Set the delegate if it has not already been set.
   * 

* This is typically used as part of MockiEbean run in order to support delegating * through to the original default ebeanServer. */ boolean withDelegateIfRequired(Database delegate); /** * Called prior to run and typically used to set test doubles to static finders. */ void beforeRun(); /** * Called after run and typically used to restore static finders (from their test doubles). */ void afterRun(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy