diff --git a/plugins/junit/src/test/java/org/apache/struts2/JUnitTestAction.java b/plugins/junit/src/test/java/org/apache/struts2/JUnitTestAction.java index a3d0ad3e3..ed29b8dd4 100644 --- a/plugins/junit/src/test/java/org/apache/struts2/JUnitTestAction.java +++ b/plugins/junit/src/test/java/org/apache/struts2/JUnitTestAction.java @@ -21,10 +21,14 @@ package org.apache.struts2; import com.opensymphony.xwork2.ActionSupport; +import org.springframework.beans.factory.annotation.Autowired; public class JUnitTestAction extends ActionSupport { private String name; + @Autowired + private MySessionBean mySessionBean; + public String getName() { return name; } diff --git a/plugins/junit/src/test/java/org/apache/struts2/MySessionBean.java b/plugins/junit/src/test/java/org/apache/struts2/MySessionBean.java new file mode 100644 index 000000000..228c11354 --- /dev/null +++ b/plugins/junit/src/test/java/org/apache/struts2/MySessionBean.java @@ -0,0 +1,28 @@ +/* + * $Id: $ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2; + +public class MySessionBean { + + public void doSomething() { + // do Something + } +} diff --git a/plugins/junit/src/test/resources/applicationContext.xml b/plugins/junit/src/test/resources/applicationContext.xml index cf988a4d3..11f2564d4 100644 --- a/plugins/junit/src/test/resources/applicationContext.xml +++ b/plugins/junit/src/test/resources/applicationContext.xml @@ -2,5 +2,17 @@ + + + + + + + + + + + + \ No newline at end of file