Skip to content

Commit 69422e7

Browse files
committed
SPR-5619 - (OpenSessionInViewTests, ClassUtilTests fixed)
Update org.sf.web/.classpath to refer to tiles 2.1.2
1 parent 8c93467 commit 69422e7

6 files changed

Lines changed: 774 additions & 690 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Copyright 2002-2009 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package org.springframework.aop.support;
17+
18+
import junit.framework.TestCase;
19+
20+
import org.springframework.aop.framework.ProxyFactory;
21+
import test.beans.TestBean;
22+
import org.springframework.util.ClassUtils;
23+
24+
/**
25+
* @author Colin Sampaleanu
26+
* @author Juergen Hoeller
27+
* @author Rob Harrop
28+
* @author Rick Evans
29+
*/
30+
public class ClassUtilsTests extends TestCase {
31+
32+
public void testGetShortNameForCglibClass() {
33+
TestBean tb = new TestBean();
34+
ProxyFactory pf = new ProxyFactory();
35+
pf.setTarget(tb);
36+
pf.setProxyTargetClass(true);
37+
TestBean proxy = (TestBean) pf.getProxy();
38+
String className = ClassUtils.getShortName(proxy.getClass());
39+
assertEquals("Class name did not match", "TestBean", className);
40+
}
41+
}

org.springframework.core/src/test/java/org/springframework/util/ClassUtilsTests.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,6 @@ public void testGetShortNameForInnerClass() {
129129
assertEquals("Class name did not match", "ClassUtilsTests.InnerClass", className);
130130
}
131131

132-
@Ignore
133-
public void ignoreTestGetShortNameForCglibClass() {
134-
// TestBean tb = new TestBean();
135-
// ProxyFactory pf = new ProxyFactory();
136-
// pf.setTarget(tb);
137-
// pf.setProxyTargetClass(true);
138-
// TestBean proxy = (TestBean) pf.getProxy();
139-
// String className = ClassUtils.getShortName(proxy.getClass());
140-
// assertEquals("Class name did not match", "TestBean", className);
141-
}
142-
143132
public void testGetShortNameAsProperty() {
144133
String shortName = ClassUtils.getShortNameAsProperty(this.getClass());
145134
assertEquals("Class name did not match", "classUtilsTests", shortName);

0 commit comments

Comments
 (0)