rave-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfrank...@apache.org
Subject svn commit: r1174480 - in /incubator/rave/trunk: rave-components/rave-core/src/main/java/org/apache/rave/portal/web/renderer/impl/ rave-components/rave-core/src/test/java/org/apache/rave/portal/web/ rave-components/rave-core/src/test/java/org/apache/ra...
Date Fri, 23 Sep 2011 01:26:07 GMT
Author: mfranklin
Date: Fri Sep 23 01:26:06 2011
New Revision: 1174480

URL: http://svn.apache.org/viewvc?rev=1174480&view=rev
Log:
Moved renderer classes to rave-core (Supports RAVE-99)

Added:
    incubator/rave/trunk/rave-components/rave-core/src/main/java/org/apache/rave/portal/web/renderer/impl/
      - copied from r1173590, incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/renderer/impl/
    incubator/rave/trunk/rave-components/rave-core/src/main/java/org/apache/rave/portal/web/renderer/impl/DefaultRenderService.java
      - copied, changed from r1174185, incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/renderer/impl/DefaultRenderService.java
    incubator/rave/trunk/rave-components/rave-core/src/main/java/org/apache/rave/portal/web/renderer/impl/DefaultScriptManager.java
      - copied unchanged from r1174185, incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/renderer/impl/DefaultScriptManager.java
    incubator/rave/trunk/rave-components/rave-core/src/test/java/org/apache/rave/portal/web/
    incubator/rave/trunk/rave-components/rave-core/src/test/java/org/apache/rave/portal/web/renderer/
    incubator/rave/trunk/rave-components/rave-core/src/test/java/org/apache/rave/portal/web/renderer/RenderServiceTest.java
      - copied unchanged from r1174185, incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/renderer/RenderServiceTest.java
    incubator/rave/trunk/rave-components/rave-core/src/test/java/org/apache/rave/portal/web/renderer/ScriptManagerTest.java
      - copied unchanged from r1174185, incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/renderer/ScriptManagerTest.java
Removed:
    incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/renderer/impl/
    incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/renderer/RenderServiceTest.java
    incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/renderer/ScriptManagerTest.java
Modified:
    incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/tag/AbstractContextAwareSingletonBeanDependentTagTest.java
    incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/tag/ScriptTagTest.java
    incubator/rave/trunk/rave-shindig/src/main/webapp/WEB-INF/classes/   (props changed)

Copied: incubator/rave/trunk/rave-components/rave-core/src/main/java/org/apache/rave/portal/web/renderer/impl/DefaultRenderService.java
(from r1174185, incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/renderer/impl/DefaultRenderService.java)
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-components/rave-core/src/main/java/org/apache/rave/portal/web/renderer/impl/DefaultRenderService.java?p2=incubator/rave/trunk/rave-components/rave-core/src/main/java/org/apache/rave/portal/web/renderer/impl/DefaultRenderService.java&p1=incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/renderer/impl/DefaultRenderService.java&r1=1174185&r2=1174480&rev=1174480&view=diff
==============================================================================
--- incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/renderer/impl/DefaultRenderService.java
(original)
+++ incubator/rave/trunk/rave-components/rave-core/src/main/java/org/apache/rave/portal/web/renderer/impl/DefaultRenderService.java
Fri Sep 23 01:26:06 2011
@@ -38,7 +38,6 @@ import java.util.*;
 public class DefaultRenderService implements RenderService {
 
     private final Map<String, RegionWidgetRenderer> supportedWidgets;
-    private final DefaultScriptManager defaultScriptManager = new DefaultScriptManager();
 
     @Autowired
     public DefaultRenderService(List<RegionWidgetRenderer> widgetRenderers) {

Modified: incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/tag/AbstractContextAwareSingletonBeanDependentTagTest.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/tag/AbstractContextAwareSingletonBeanDependentTagTest.java?rev=1174480&r1=1174479&r2=1174480&view=diff
==============================================================================
--- incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/tag/AbstractContextAwareSingletonBeanDependentTagTest.java
(original)
+++ incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/tag/AbstractContextAwareSingletonBeanDependentTagTest.java
Fri Sep 23 01:26:06 2011
@@ -20,11 +20,13 @@
 package org.apache.rave.portal.web.tag;
 
 
+import org.apache.rave.portal.web.renderer.model.RenderContext;
 import org.junit.Before;
 import org.junit.Test;
 import org.springframework.web.context.WebApplicationContext;
 
 import javax.servlet.ServletContext;
+import javax.servlet.ServletRequest;
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.JspWriter;
 import javax.servlet.jsp.PageContext;
@@ -32,8 +34,8 @@ import javax.servlet.jsp.PageContext;
 import java.io.IOException;
 
 import static org.easymock.EasyMock.*;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.sameInstance;
+import static org.hamcrest.CoreMatchers.*;
+import static org.hamcrest.CoreMatchers.not;
 import static org.junit.Assert.assertThat;
 
 public class AbstractContextAwareSingletonBeanDependentTagTest {
@@ -98,4 +100,18 @@ public class AbstractContextAwareSinglet
 
         tag.writeString(TEST_STRING);
     }
+
+    @Test
+    public void getContext() {
+        pageContext = createNiceMock(PageContext.class);
+        ServletRequest request = createNiceMock(ServletRequest.class);
+        replay(request);
+        expect(pageContext.getRequest()).andReturn(request).anyTimes();
+        replay(pageContext);
+        tag.setPageContext(pageContext);
+
+        RenderContext context = tag.getContext();
+        assertThat(context, is(not(nullValue())));
+        assertThat(context.getProperties(), is(not(nullValue())));
+    }
 }

Modified: incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/tag/ScriptTagTest.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/tag/ScriptTagTest.java?rev=1174480&r1=1174479&r2=1174480&view=diff
==============================================================================
--- incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/tag/ScriptTagTest.java
(original)
+++ incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/tag/ScriptTagTest.java
Fri Sep 23 01:26:06 2011
@@ -22,6 +22,7 @@ package org.apache.rave.portal.web.tag;
 import org.apache.rave.portal.web.renderer.model.RenderContext;
 import org.apache.rave.portal.web.renderer.ScriptLocation;
 import org.apache.rave.portal.web.renderer.ScriptManager;
+import org.hamcrest.CoreMatchers;
 import org.junit.Before;
 import org.junit.Test;
 import org.springframework.mock.web.MockHttpServletRequest;
@@ -41,6 +42,7 @@ import java.util.List;
 import static org.easymock.EasyMock.*;
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.nullValue;
 import static org.junit.Assert.assertThat;
 
 /**
@@ -94,6 +96,7 @@ public class ScriptTagTest {
         tag.setLocation(ScriptLocation.BEFORE_RAVE);
         int result = tag.doStartTag();
         assertThat(result, is(equalTo(1)));
+        assertThat(tag.getLocation() == null, is(true));
         verify(writer);
     }
 

Propchange: incubator/rave/trunk/rave-shindig/src/main/webapp/WEB-INF/classes/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Sep 23 01:26:06 2011
@@ -0,0 +1 @@
+shindig.properties



Mime
View raw message