java.lang.Object | |
↳ | com.google.gwt.junit.FakeMessagesMaker |
Helper to make a fake implementation of any Messages
interface via
reflection, for use in JUnit tests. (This will not work in GWTTestCase.) All
calls to the returned object return the method name followed by the passed
parameters as a list surrounded by [].
Note that the default message text is very consciously not made available through the fake, to help tests ensure that specific translations of localized text are not relied upon.
Sample use:
interface MyMessages extends Messages { @DefaultMessage("Isn''t this the fakiest?") @Description("A sample message to be tested.") String myMessage(); } public void testSimple() { MyMessages messages = FakeMessagesMaker.create(MyMessages.class); assertEquals("myMessage", messages.myMessage()); }
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
java.lang.reflect.InvocationHandler
|