Polishing
This commit is contained in:
@@ -30,7 +30,7 @@ import org.junit.Test;
|
||||
* @author Adrian Colyer
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class AspectJAdviceParameterNameDiscoverAnnotationTests
|
||||
public class AspectJAdviceParameterNameDiscoverAnnotationTests
|
||||
extends AspectJAdviceParameterNameDiscovererTests {
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
@@ -43,7 +43,7 @@ import static org.junit.Assert.*;
|
||||
* @author Rod Johnson
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class AspectJExpressionPointcutTests {
|
||||
public class AspectJExpressionPointcutTests {
|
||||
|
||||
public static final String MATCH_ALL_METHODS = "execution(* *(..))";
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import static org.junit.Assert.*;
|
||||
* @author Ramnivas Laddad
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class BeanNamePointcutMatchingTests {
|
||||
public class BeanNamePointcutMatchingTests {
|
||||
|
||||
@Test
|
||||
public void testMatchingPointcuts() {
|
||||
|
||||
@@ -44,7 +44,7 @@ import static org.junit.Assert.*;
|
||||
* @author Ramnivas Laddad
|
||||
* @since 2.0
|
||||
*/
|
||||
public final class MethodInvocationProceedingJoinPointTests {
|
||||
public class MethodInvocationProceedingJoinPointTests {
|
||||
|
||||
@Test
|
||||
public void testingBindingWithJoinPoint() {
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.springframework.aop.aspectj.AspectJAdviceParameterNameDiscoverer.Ambi
|
||||
* @author Adrian Colyer
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class TigerAspectJAdviceParameterNameDiscovererTests
|
||||
public class TigerAspectJAdviceParameterNameDiscovererTests
|
||||
extends AspectJAdviceParameterNameDiscovererTests {
|
||||
|
||||
@Test
|
||||
|
||||
@@ -35,9 +35,9 @@ import static org.junit.Assert.*;
|
||||
* @author Rick Evans
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class TypePatternClassFilterTests {
|
||||
public class TypePatternClassFilterTests {
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testInvalidPattern() {
|
||||
// should throw - pattern must be recognized as invalid
|
||||
new TypePatternClassFilter("-");
|
||||
@@ -78,12 +78,12 @@ public final class TypePatternClassFilterTests {
|
||||
assertTrue("matches Double",tpcf.matches(Double.class));
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testSetTypePatternWithNullArgument() throws Exception {
|
||||
new TypePatternClassFilter(null);
|
||||
}
|
||||
|
||||
@Test(expected=IllegalStateException.class)
|
||||
@Test(expected = IllegalStateException.class)
|
||||
public void testInvocationOfMatchesMethodBlowsUpWhenNoTypePatternHasBeenSet() throws Exception {
|
||||
new TypePatternClassFilter().matches(String.class);
|
||||
}
|
||||
|
||||
@@ -586,7 +586,7 @@ public abstract class AbstractAspectJAdvisorFactoryTests {
|
||||
itb.getAge();
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testDeclarePrecedenceNotSupported() {
|
||||
TestBean target = new TestBean();
|
||||
MetadataAwareAspectInstanceFactory aspectInstanceFactory = new SingletonMetadataAwareAspectInstanceFactory(
|
||||
|
||||
@@ -39,7 +39,7 @@ import static org.junit.Assert.*;
|
||||
*/
|
||||
public class ArgumentBindingTests {
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testBindingInPointcutUsedByAdvice() {
|
||||
TestBean tb = new TestBean();
|
||||
AspectJProxyFactory proxyFactory = new AspectJProxyFactory(tb);
|
||||
@@ -49,7 +49,7 @@ public class ArgumentBindingTests {
|
||||
proxiedTestBean.setName("Supercalifragalisticexpialidocious");
|
||||
}
|
||||
|
||||
@Test(expected=IllegalStateException.class)
|
||||
@Test(expected = IllegalStateException.class)
|
||||
public void testAnnotationArgumentNameBinding() {
|
||||
TransactionalBean tb = new TransactionalBean();
|
||||
AspectJProxyFactory proxyFactory = new AspectJProxyFactory(tb);
|
||||
|
||||
@@ -30,9 +30,9 @@ import static org.junit.Assert.*;
|
||||
* @author Rod Johnson
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class AspectMetadataTests {
|
||||
public class AspectMetadataTests {
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testNotAnAspect() {
|
||||
new AspectMetadata(String.class,"someBean");
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ package org.springframework.aop.aspectj.annotation;
|
||||
* @author Rod Johnson
|
||||
* @since 2.0
|
||||
*/
|
||||
public final class ReflectiveAspectJAdvisorFactoryTests extends AbstractAspectJAdvisorFactoryTests {
|
||||
public class ReflectiveAspectJAdvisorFactoryTests extends AbstractAspectJAdvisorFactoryTests {
|
||||
|
||||
@Override
|
||||
protected AspectJAdvisorFactory getFixture() {
|
||||
|
||||
@@ -37,7 +37,7 @@ import static org.junit.Assert.*;
|
||||
* @author Rob Harrop
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class AspectJNamespaceHandlerTests {
|
||||
public class AspectJNamespaceHandlerTests {
|
||||
|
||||
private ParserContext parserContext;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ import static org.springframework.tests.TestResourceUtils.*;
|
||||
* @author Juergen Hoeller
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class AopNamespaceHandlerEventTests {
|
||||
public class AopNamespaceHandlerEventTests {
|
||||
|
||||
private static final Class<?> CLASS = AopNamespaceHandlerEventTests.class;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import static org.springframework.tests.TestResourceUtils.*;
|
||||
* @author Mark Fisher
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class AopNamespaceHandlerPointcutErrorTests {
|
||||
public class AopNamespaceHandlerPointcutErrorTests {
|
||||
|
||||
@Test
|
||||
public void testDuplicatePointcutConfig() {
|
||||
|
||||
@@ -31,7 +31,7 @@ import static org.springframework.tests.TestResourceUtils.*;
|
||||
* @author Rob Harrop
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class TopLevelAopTagTests {
|
||||
public class TopLevelAopTagTests {
|
||||
|
||||
private static final Resource CONTEXT = qualifiedResource(TopLevelAopTagTests.class, "context.xml");
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ import org.springframework.util.StopWatch;
|
||||
* @author Chris Beams
|
||||
* @since 2.0
|
||||
*/
|
||||
public final class IntroductionBenchmarkTests {
|
||||
public class IntroductionBenchmarkTests {
|
||||
|
||||
private static final int EXPECTED_COMPARE = 13;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import static org.junit.Assert.*;
|
||||
* @author Chris Beams
|
||||
* @since 14.03.2003
|
||||
*/
|
||||
public final class MethodInvocationTests {
|
||||
public class MethodInvocationTests {
|
||||
|
||||
@Test
|
||||
public void testValidInvocation() throws Throwable {
|
||||
|
||||
@@ -32,7 +32,7 @@ import static org.springframework.tests.TestResourceUtils.*;
|
||||
* @author Chris Beams
|
||||
* @since 03.09.2004
|
||||
*/
|
||||
public final class PrototypeTargetTests {
|
||||
public class PrototypeTargetTests {
|
||||
|
||||
private static final Resource CONTEXT = qualifiedResource(PrototypeTargetTests.class, "context.xml");
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ import static org.junit.Assert.*;
|
||||
* @author Chris Beams
|
||||
* @since 06.04.2004
|
||||
*/
|
||||
public final class ConcurrencyThrottleInterceptorTests {
|
||||
public class ConcurrencyThrottleInterceptorTests {
|
||||
|
||||
protected static final Log logger = LogFactory.getLog(ConcurrencyThrottleInterceptorTests.class);
|
||||
|
||||
|
||||
@@ -29,51 +29,51 @@ import static org.mockito.BDDMockito.*;
|
||||
* @author Juergen Hoeller
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class CustomizableTraceInterceptorTests {
|
||||
public class CustomizableTraceInterceptorTests {
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testSetEmptyEnterMessage() {
|
||||
// Must not be able to set empty enter message
|
||||
new CustomizableTraceInterceptor().setEnterMessage("");
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testSetEnterMessageWithReturnValuePlaceholder() {
|
||||
// Must not be able to set enter message with return value placeholder
|
||||
new CustomizableTraceInterceptor().setEnterMessage(CustomizableTraceInterceptor.PLACEHOLDER_RETURN_VALUE);
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testSetEnterMessageWithExceptionPlaceholder() {
|
||||
// Must not be able to set enter message with exception placeholder
|
||||
new CustomizableTraceInterceptor().setEnterMessage(CustomizableTraceInterceptor.PLACEHOLDER_EXCEPTION);
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testSetEnterMessageWithInvocationTimePlaceholder() {
|
||||
// Must not be able to set enter message with invocation time placeholder
|
||||
new CustomizableTraceInterceptor().setEnterMessage(CustomizableTraceInterceptor.PLACEHOLDER_INVOCATION_TIME);
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testSetEmptyExitMessage() {
|
||||
// Must not be able to set empty exit message
|
||||
new CustomizableTraceInterceptor().setExitMessage("");
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testSetExitMessageWithExceptionPlaceholder() {
|
||||
// Must not be able to set exit message with exception placeholder
|
||||
new CustomizableTraceInterceptor().setExitMessage(CustomizableTraceInterceptor.PLACEHOLDER_EXCEPTION);
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testSetEmptyExceptionMessage() {
|
||||
// Must not be able to set empty exception message
|
||||
new CustomizableTraceInterceptor().setExceptionMessage("");
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testSetExceptionMethodWithReturnValuePlaceholder() {
|
||||
// Must not be able to set exception message with return value placeholder
|
||||
new CustomizableTraceInterceptor().setExceptionMessage(CustomizableTraceInterceptor.PLACEHOLDER_RETURN_VALUE);
|
||||
|
||||
@@ -29,7 +29,7 @@ import static org.mockito.BDDMockito.*;
|
||||
* @author Rick Evans
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class DebugInterceptorTests {
|
||||
public class DebugInterceptorTests {
|
||||
|
||||
@Test
|
||||
public void testSunnyDayPathLogsCorrectly() throws Throwable {
|
||||
|
||||
@@ -29,7 +29,7 @@ import static org.junit.Assert.*;
|
||||
* @author Rod Johnson
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class ExposeBeanNameAdvisorsTests {
|
||||
public class ExposeBeanNameAdvisorsTests {
|
||||
|
||||
private class RequiresBeanNameBoundTestBean extends TestBean {
|
||||
private final String beanName;
|
||||
|
||||
@@ -34,7 +34,7 @@ import static org.springframework.tests.TestResourceUtils.*;
|
||||
* @author Rod Johnson
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class ExposeInvocationInterceptorTests {
|
||||
public class ExposeInvocationInterceptorTests {
|
||||
|
||||
private static final Resource CONTEXT =
|
||||
qualifiedResource(ExposeInvocationInterceptorTests.class, "context.xml");
|
||||
|
||||
@@ -28,7 +28,7 @@ import static org.mockito.BDDMockito.*;
|
||||
* @author Rick Evans
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class PerformanceMonitorInterceptorTests {
|
||||
public class PerformanceMonitorInterceptorTests {
|
||||
|
||||
@Test
|
||||
public void testSuffixAndPrefixAssignment() {
|
||||
|
||||
@@ -29,7 +29,7 @@ import static org.mockito.BDDMockito.*;
|
||||
* @author Rick Evans
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class SimpleTraceInterceptorTests {
|
||||
public class SimpleTraceInterceptorTests {
|
||||
|
||||
@Test
|
||||
public void testSunnyDayPathLogsCorrectly() throws Throwable {
|
||||
|
||||
@@ -28,27 +28,27 @@ import static org.mockito.BDDMockito.*;
|
||||
* @author Rick Evans
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class DefaultScopedObjectTests {
|
||||
public class DefaultScopedObjectTests {
|
||||
|
||||
private static final String GOOD_BEAN_NAME = "foo";
|
||||
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testCtorWithNullBeanFactory() throws Exception {
|
||||
new DefaultScopedObject(null, GOOD_BEAN_NAME);
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testCtorWithNullTargetBeanName() throws Exception {
|
||||
testBadTargetBeanName(null);
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testCtorWithEmptyTargetBeanName() throws Exception {
|
||||
testBadTargetBeanName("");
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testCtorWithJustWhitespacedTargetBeanName() throws Exception {
|
||||
testBadTargetBeanName(" ");
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ import static org.springframework.tests.TestResourceUtils.*;
|
||||
* @author Mark Fisher
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class ScopedProxyAutowireTests {
|
||||
public class ScopedProxyAutowireTests {
|
||||
|
||||
private static final Class<?> CLASS = ScopedProxyAutowireTests.class;
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ import static org.junit.Assert.*;
|
||||
* @author Rod Johnson
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class AopUtilsTests {
|
||||
public class AopUtilsTests {
|
||||
|
||||
@Test
|
||||
public void testPointcutCanNeverApply() {
|
||||
|
||||
@@ -29,7 +29,7 @@ import static org.junit.Assert.*;
|
||||
* @author Rod Johnson
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class ClassFiltersTests {
|
||||
public class ClassFiltersTests {
|
||||
|
||||
private ClassFilter exceptionFilter = new RootClassFilter(Exception.class);
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import static org.junit.Assert.*;
|
||||
* @author Rod Johnson
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class ControlFlowPointcutTests {
|
||||
public class ControlFlowPointcutTests {
|
||||
|
||||
@Test
|
||||
public void testMatches() {
|
||||
|
||||
@@ -43,9 +43,9 @@ import static org.mockito.BDDMockito.*;
|
||||
* @author Chris Beams
|
||||
* @since 13.05.2003
|
||||
*/
|
||||
public final class DelegatingIntroductionInterceptorTests {
|
||||
public class DelegatingIntroductionInterceptorTests {
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testNullTarget() throws Exception {
|
||||
// Shouldn't accept null target
|
||||
new DelegatingIntroductionInterceptor(null);
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.springframework.aop.support;
|
||||
/**
|
||||
* @author Dmitriy Kopylenko
|
||||
*/
|
||||
public final class JdkRegexpMethodPointcutTests extends AbstractRegexpMethodPointcutTests {
|
||||
public class JdkRegexpMethodPointcutTests extends AbstractRegexpMethodPointcutTests {
|
||||
|
||||
@Override
|
||||
protected AbstractRegexpMethodPointcut getRegexpMethodPointcut() {
|
||||
|
||||
@@ -33,7 +33,7 @@ import static org.junit.Assert.*;
|
||||
* @author Rod Johnson
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class NameMatchMethodPointcutTests {
|
||||
public class NameMatchMethodPointcutTests {
|
||||
|
||||
protected NameMatchMethodPointcut pc;
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ import static org.springframework.tests.TestResourceUtils.*;
|
||||
* @author Rod Johnson
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class RegexpMethodPointcutAdvisorIntegrationTests {
|
||||
public class RegexpMethodPointcutAdvisorIntegrationTests {
|
||||
|
||||
private static final Resource CONTEXT =
|
||||
qualifiedResource(RegexpMethodPointcutAdvisorIntegrationTests.class, "context.xml");
|
||||
|
||||
@@ -30,7 +30,7 @@ import static org.springframework.tests.TestResourceUtils.*;
|
||||
/**
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
public final class CommonsPool2TargetSourceProxyTests {
|
||||
public class CommonsPool2TargetSourceProxyTests {
|
||||
|
||||
private static final Resource CONTEXT =
|
||||
qualifiedResource(CommonsPool2TargetSourceProxyTests.class, "context.xml");
|
||||
|
||||
@@ -39,7 +39,7 @@ import static org.springframework.tests.TestResourceUtils.*;
|
||||
* @author Rod Johnson
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class HotSwappableTargetSourceTests {
|
||||
public class HotSwappableTargetSourceTests {
|
||||
|
||||
private static final Resource CONTEXT = qualifiedResource(HotSwappableTargetSourceTests.class, "context.xml");
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import static org.junit.Assert.*;
|
||||
* @author Juergen Hoeller
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class LazyCreationTargetSourceTests {
|
||||
public class LazyCreationTargetSourceTests {
|
||||
|
||||
@Test
|
||||
public void testCreateLazy() {
|
||||
|
||||
@@ -34,7 +34,7 @@ import static org.springframework.tests.TestResourceUtils.*;
|
||||
* @author Chris Beams
|
||||
* @since 07.01.2005
|
||||
*/
|
||||
public final class LazyInitTargetSourceTests {
|
||||
public class LazyInitTargetSourceTests {
|
||||
|
||||
private static final Class<?> CLASS = LazyInitTargetSourceTests.class;
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ import static org.junit.Assert.*;
|
||||
* @author Rod Johnson
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class PrototypeBasedTargetSourceTests {
|
||||
public class PrototypeBasedTargetSourceTests {
|
||||
|
||||
@Test
|
||||
public void testSerializability() throws Exception {
|
||||
|
||||
@@ -33,7 +33,7 @@ import static org.springframework.tests.TestResourceUtils.*;
|
||||
* @author Rod Johnson
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class PrototypeTargetSourceTests {
|
||||
public class PrototypeTargetSourceTests {
|
||||
|
||||
private static final Resource CONTEXT = qualifiedResource(PrototypeTargetSourceTests.class, "context.xml");
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import static org.junit.Assert.*;
|
||||
* @author Rob Harrop
|
||||
* @author Chris Beams
|
||||
*/
|
||||
public final class RefreshableTargetSourceTests {
|
||||
public class RefreshableTargetSourceTests {
|
||||
|
||||
/**
|
||||
* Test what happens when checking for refresh but not refreshing object.
|
||||
|
||||
Reference in New Issue
Block a user