You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by et...@apache.org on 2008/09/21 04:53:47 UTC
svn commit: r697442 - in
/incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite:
CachingContentRewriterRegistryTest.java
DefaultContentRewriterRegistryTest.java
Author: etnu
Date: Sat Sep 20 19:53:47 2008
New Revision: 697442
URL: http://svn.apache.org/viewvc?rev=697442&view=rev
Log:
Fixed incorrect imports.
Modified:
incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/CachingContentRewriterRegistryTest.java
incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/DefaultContentRewriterRegistryTest.java
Modified: incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/CachingContentRewriterRegistryTest.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/CachingContentRewriterRegistryTest.java?rev=697442&r1=697441&r2=697442&view=diff
==============================================================================
--- incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/CachingContentRewriterRegistryTest.java (original)
+++ incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/CachingContentRewriterRegistryTest.java Sat Sep 20 19:53:47 2008
@@ -27,6 +27,7 @@
import org.apache.shindig.common.uri.Uri;
import org.apache.shindig.gadgets.Gadget;
import org.apache.shindig.gadgets.GadgetContext;
+import org.apache.shindig.gadgets.JsLibrary;
import org.apache.shindig.gadgets.MutableContent;
import org.apache.shindig.gadgets.http.HttpRequest;
import org.apache.shindig.gadgets.http.HttpResponse;
@@ -35,13 +36,12 @@
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
-import edu.emory.mathcs.backport.java.util.Collections;
-
import org.easymock.classextension.EasyMock;
import org.easymock.classextension.IMocksControl;
import org.junit.Test;
import java.net.URI;
+import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -55,13 +55,12 @@
private final ContainerConfig config = control.createMock(ContainerConfig.class);
@Test
- @SuppressWarnings("unchecked")
public void gadgetGetsCached() throws Exception {
String body = "Hello, world";
String xml = "<Module><ModulePrefs title=''/><Content>" + body + "</Content></Module>";
GadgetSpec spec = new GadgetSpec(URI.create("#"), xml);
GadgetContext context = new GadgetContext();
- Gadget gadget = new Gadget(context, spec, Collections.emptyList(), config, null);
+ Gadget gadget = new Gadget(context, spec, new ArrayList<JsLibrary>(), config, null);
control.replay();
@@ -73,7 +72,6 @@
}
@Test
- @SuppressWarnings("unchecked")
public void gadgetFetchedFromCache() throws Exception {
String body = "Hello, world";
String xml = "<Module><ModulePrefs title=''/><Content>" + body + "</Content></Module>";
@@ -85,11 +83,11 @@
// We have to re-create Gadget objects because they get mutated directly, which is really
// inconsistent with the behavior of rewriteHttpResponse.
- Gadget gadget = new Gadget(context, spec, Collections.emptyList(), config, null);
+ Gadget gadget = new Gadget(context, spec, new ArrayList<JsLibrary>(), config, null);
registry.rewriteGadget(gadget);
- gadget = new Gadget(context, spec, Collections.emptyList(), config, null);
+ gadget = new Gadget(context, spec, new ArrayList<JsLibrary>(), config, null);
registry.rewriteGadget(gadget);
- gadget = new Gadget(context, spec, Collections.emptyList(), config, null);
+ gadget = new Gadget(context, spec, new ArrayList<JsLibrary>(), config, null);
registry.rewriteGadget(gadget);
// TODO: We're not actually testing the TTL of the entries here.
@@ -98,7 +96,6 @@
}
@Test
- @SuppressWarnings("unchecked")
public void noCacheGadgetDoesNotGetCached() throws Exception {
String body = "Hello, world";
String xml = "<Module><ModulePrefs title=''/><Content>" + body + "</Content></Module>";
@@ -110,7 +107,7 @@
}
};
- Gadget gadget = new Gadget(context, spec, Collections.emptyList(), config, null);
+ Gadget gadget = new Gadget(context, spec, new ArrayList<JsLibrary>(), config, null);
control.replay();
Modified: incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/DefaultContentRewriterRegistryTest.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/DefaultContentRewriterRegistryTest.java?rev=697442&r1=697441&r2=697442&view=diff
==============================================================================
--- incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/DefaultContentRewriterRegistryTest.java (original)
+++ incubator/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/DefaultContentRewriterRegistryTest.java Sat Sep 20 19:53:47 2008
@@ -24,17 +24,17 @@
import org.apache.shindig.common.uri.Uri;
import org.apache.shindig.gadgets.Gadget;
import org.apache.shindig.gadgets.GadgetContext;
+import org.apache.shindig.gadgets.JsLibrary;
import org.apache.shindig.gadgets.http.HttpRequest;
import org.apache.shindig.gadgets.http.HttpResponse;
import org.apache.shindig.gadgets.spec.GadgetSpec;
-import edu.emory.mathcs.backport.java.util.Collections;
-
import org.easymock.classextension.EasyMock;
import org.easymock.classextension.IMocksControl;
import org.junit.Test;
import java.net.URI;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -47,13 +47,12 @@
private final ContainerConfig config = control.createMock(ContainerConfig.class);
@Test
- @SuppressWarnings("unchecked")
public void rewriteGadget() throws Exception {
String body = "Hello, world";
String xml = "<Module><ModulePrefs title=''/><Content>" + body + "</Content></Module>";
GadgetSpec spec = new GadgetSpec(URI.create("#"), xml);
GadgetContext context = new GadgetContext();
- Gadget gadget = new Gadget(context, spec, Collections.emptyList(), config, null);
+ Gadget gadget = new Gadget(context, spec, new ArrayList<JsLibrary>(), config, null);
control.replay();