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

com.oneandone.ejbcdiunit.persistence.TestClosure Maven / Gradle / Ivy

Go to download

A module that can be used together with cdiunit to build en ejb-test-environment.

The newest version!
package com.oneandone.ejbcdiunit.persistence;

/**
 * This Interface should be implemented by Test-Parts which will be encapsulated in transactions.
 * To avoid having to implement try/catch in these parts, execute may throw Exception.
 * The Lambda executing code must handle this correctly. In case of Tests it is feasible to resend the Exception as
 * RuntimeException.
 * @author aschoerk
 */
public interface TestClosure {

    /**
     * The code to be executed as lambda
     * @throws Exception The checked Exception the code may throw. The caller of the lambda could encapsulate it as
     * unchecked exception
     */
    void execute() throws Exception;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy