google-code-export / gwt-test-utils

Automatically exported from code.google.com/p/gwt-test-utils
1 stars 0 forks source link

Dictionary object not patched #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am trying out gwt-test-utils, but need to do a final part before i can run it 
in my project. 

One of the issues I found is that Dictionary class must be overridden.

Error when running my test file:

java.lang.UnsatisfiedLinkError: 
com.google.gwt.i18n.client.Dictionary.attach(Ljava/lang/String;)V
    at com.google.gwt.i18n.client.Dictionary.attach(Native Method)
    at com.google.gwt.i18n.client.Dictionary.<init>(Dictionary.java:120)
    at com.google.gwt.i18n.client.Dictionary.getDictionary(Dictionary.java:93)

So in the Dictionary.class attach() method needs to be patched out.

Original issue reported on code.google.com by jesperrr@gmail.com on 5 Oct 2011 at 10:04

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 5 Oct 2011 at 11:17

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 8 Oct 2011 at 4:20

GoogleCodeExporter commented 9 years ago
Hi,

Dictionary are now supported. But in this first support, gwt-test-utils will 
not parse your custom javascript to retrieve your JSON objects and map them to 
Java String key/value pairs.
Instead, you'll have to submit a map of dictionary entries at the begining of 
your test. This is done through the 'GwtTest.addDictionaryEntries' method : 

  /**
   * Add String key/value pairs to a GWT {@link Dictionary}.
   * 
   * @param dictionaryName The name of the {@link Dictionary} on which the
   *          entries should be added
   * @param entries The Dictionary's entries to add
   * 
   * @see {@link Dictionary#get(String)}
   */
  void addDictionaryEntries(String dictionaryName, Map<String, String> entries);

Look at the DictionaryTest to see it in action :

http://code.google.com/p/gwt-test-utils/source/browse/src/framework/trunk/gwt-te
st-utils/src/test/java/com/octo/gwt/test/DictionaryTest.java

I just deployed new 0.35-SNAPSHOT, 0.33.1-SNAPSHOT, 0.28.8-SNAPSHOT, 
0.25.5-SNAPSHOT and 0.22.5-SNAPSHOT.
Could you please give it a try and give me some feedback so I could close this 
issue ?
Thanks !

Original comment by gael.laz...@gmail.com on 8 Oct 2011 at 6:29