2016/02/07 - Apache Onami has been retired.

For more information, please explore the Attic.

public class

GuiceMockModule

extends AbstractModule
java.lang.Object
   ↳ com.google.inject.AbstractModule
     ↳ org.apache.onami.test.GuiceMockModule

Class Overview

This class creates the binding for all mock objects found.

Method configure() creates a binding for each Mock annotation found. The binding will be created if and only if there is no types conflict between Mock caught.

A type conflict is detected if two or more field are annotated with the same Mock and no different Mock#annotatedWith parameter are specified, or two o more equals Mock#annotatedWith parameter are specified for the same type field.

If a conflict is detected the binding will not create for the conflicted type, moreover the field will be injected into the test class.

Summary

Public Constructors
GuiceMockModule(Map<FieldObject> mockedFields)
Costructor.
Protected Methods
void configure()
[Expand]
Inherited Methods
From class com.google.inject.AbstractModule
From class java.lang.Object
From interface com.google.inject.Module

Public Constructors

public GuiceMockModule (Map<FieldObject> mockedFields)

Costructor.

Parameters
mockedFields the map of mock fileds.

Protected Methods

protected void configure ()