Shortest path to tests running with Spring Framework 5
Upgrade to Java 8+ Remove Portlet, Tiles2, and Hibernate 3 + 4 support Issue: SWF-1692
This commit is contained in:
@@ -37,9 +37,4 @@ public abstract class AbstractResourcesConfigurationTests extends TestCase {
|
||||
assertEquals(0, handlerMapping.getOrder());
|
||||
}
|
||||
|
||||
public void testConfigurePortlet() {
|
||||
Object resourceHandler = this.context.getBean(ResourcesBeanDefinitionParser.PORTLET_RESOURCE_HANDLER_BEAN_NAME);
|
||||
assertNotNull(resourceHandler);
|
||||
assertTrue(resourceHandler instanceof org.springframework.faces.webflow.context.portlet.JsfResourceRequestHandler);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import org.springframework.expression.spel.standard.SpelExpressionParser;
|
||||
import org.springframework.webflow.engine.builder.ViewFactoryCreator;
|
||||
import org.springframework.webflow.engine.builder.support.FlowBuilderServices;
|
||||
import org.springframework.webflow.expression.spel.WebFlowSpringELExpressionParser;
|
||||
import org.springframework.webflow.validation.BeanValidationHintResolver;
|
||||
|
||||
public class FacesFlowBuilderServicesJavaConfigTests extends AbstractFacesFlowBuilderServicesConfigurationTests {
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package org.springframework.faces.config;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
public class ResourcesJavaConfigTests extends AbstractResourcesConfigurationTests {
|
||||
|
||||
|
||||
@Override
|
||||
protected ApplicationContext initApplicationContext() {
|
||||
return new AnnotationConfigApplicationContext(FacesFlowConfig.class);
|
||||
}
|
||||
|
||||
@Configuration
|
||||
static class FacesFlowConfig extends AbstractFacesPortletFlowConfiguration {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package org.springframework.faces.webflow.context.portlet;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.springframework.mock.web.portlet.MockPortletRequest;
|
||||
|
||||
public class MultiValueRequestParameterMapTests extends TestCase {
|
||||
|
||||
private MultiValueRequestParameterMap requestMap;
|
||||
|
||||
private MockPortletRequest request;
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
this.request = new MockPortletRequest();
|
||||
this.requestMap = new MultiValueRequestParameterMap(this.request);
|
||||
}
|
||||
|
||||
public void testMultiValueParameter() throws Exception {
|
||||
this.request.setParameter("key", "value");
|
||||
this.request.addParameter("key", "value2");
|
||||
Object actual = this.requestMap.getAttribute("key");
|
||||
assertTrue(actual.getClass().isArray());
|
||||
assertEquals(2, ((String[]) actual).length);
|
||||
assertEquals("value", ((String[]) actual)[0]);
|
||||
assertEquals("value2", ((String[]) actual)[1]);
|
||||
}
|
||||
|
||||
public void testSingleValueParameterAsArray() throws Exception {
|
||||
this.request.setParameter("key", "value");
|
||||
Object actual = this.requestMap.getAttribute("key");
|
||||
assertTrue(actual.getClass().isArray());
|
||||
assertEquals(1, ((String[]) actual).length);
|
||||
assertEquals("value", ((String[]) actual)[0]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
package org.springframework.faces.webflow.context.portlet;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.springframework.mock.web.portlet.MockPortletRequest;
|
||||
|
||||
public class MultiValueRequestPropertyMapTests extends TestCase {
|
||||
|
||||
private MultiValueRequestPropertyMap requestMap;
|
||||
|
||||
private MockPortletRequest request;
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
this.request = new MockPortletRequest();
|
||||
this.requestMap = new MultiValueRequestPropertyMap(this.request);
|
||||
}
|
||||
|
||||
public void testMultiValueProperty() throws Exception {
|
||||
this.request.setProperty("key", "value");
|
||||
this.request.addProperty("key", "value2");
|
||||
Object actual = this.requestMap.getAttribute("key");
|
||||
assertEquals(2, ((String[]) actual).length);
|
||||
assertEquals("value", ((String[]) actual)[0]);
|
||||
assertEquals("value2", ((String[]) actual)[1]);
|
||||
}
|
||||
|
||||
public void testSingleValuePropertyAsArray() throws Exception {
|
||||
this.request.setProperty("key", "value");
|
||||
Object actual = this.requestMap.getAttribute("key");
|
||||
assertEquals(1, ((String[]) actual).length);
|
||||
assertEquals("value", ((String[]) actual)[0]);
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package org.springframework.faces.webflow.context.portlet;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.springframework.mock.web.portlet.MockPortletRequest;
|
||||
|
||||
public class SingleValueRequestParameterMapTests extends TestCase {
|
||||
|
||||
private SingleValueRequestParameterMap requestMap;
|
||||
|
||||
private MockPortletRequest request;
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
this.request = new MockPortletRequest();
|
||||
this.requestMap = new SingleValueRequestParameterMap(this.request);
|
||||
}
|
||||
|
||||
public void testSingleValueParameter() throws Exception {
|
||||
this.request.setParameter("key", "value");
|
||||
assertEquals("value", this.requestMap.getAttribute("key"));
|
||||
}
|
||||
|
||||
public void testMultiValueParameterAsString() throws Exception {
|
||||
this.request.setParameter("key", "value");
|
||||
this.request.addParameter("key", "value2");
|
||||
Object actual = this.requestMap.getAttribute("key");
|
||||
assertEquals("value", actual);
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package org.springframework.faces.webflow.context.portlet;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.springframework.mock.web.portlet.MockPortletRequest;
|
||||
|
||||
public class SingleValueRequestPropertyMapTests extends TestCase {
|
||||
|
||||
private SingleValueRequestPropertyMap requestMap;
|
||||
|
||||
private MockPortletRequest request;
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
this.request = new MockPortletRequest();
|
||||
this.requestMap = new SingleValueRequestPropertyMap(this.request);
|
||||
}
|
||||
|
||||
public void testSingleValueProperty() throws Exception {
|
||||
this.request.setProperty("key", "value");
|
||||
assertEquals("value", this.requestMap.getAttribute("key"));
|
||||
}
|
||||
|
||||
public void testMultiValuePropertyAsString() throws Exception {
|
||||
this.request.setProperty("key", "value");
|
||||
this.request.addProperty("key", "value2");
|
||||
Object actual = this.requestMap.getAttribute("key");
|
||||
assertEquals("value", actual);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user