org.springframework.aop.aspectj.AspectJAdviceParameterNameDiscoverer.AmbiguousBindingException Java Examples

The following examples show how to use org.springframework.aop.aspectj.AspectJAdviceParameterNameDiscoverer.AmbiguousBindingException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AspectJAdviceParameterNameDiscovererTests.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Test
public void testTargetBindingTwoCandidates() {
	assertException(getMethod("oneObject"), "target(x) || target(y)", AmbiguousBindingException.class,
			"Found 2 candidate this(), target() or args() variables but only one unbound argument slot");
}
 
Example #2
Source File: AspectJAdviceParameterNameDiscovererTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Test
public void testArgsOnePrimitiveOneObject() {
	assertException(getMethod("oneObjectOnePrimitive"), "args(count,obj)", AmbiguousBindingException.class,
			"Found 2 candidate variable names but only one candidate binding slot when matching primitive args");
}
 
Example #3
Source File: AspectJAdviceParameterNameDiscovererTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Test
public void testAmbiguousArgsBinding() {
	assertException(getMethod("twoObjects"), "args(x,y)", AmbiguousBindingException.class,
			"Still 2 unbound args at this(),target(),args() binding stage, with no way to determine between them");
}
 
Example #4
Source File: AspectJAdviceParameterNameDiscovererTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Test
public void testArgsBindingOneObjectTwoCandidates() {
	assertException(getMethod("oneObject"), "args(x,y)", AmbiguousBindingException.class,
			"Found 2 candidate this(), target() or args() variables but only one unbound argument slot");
}
 
Example #5
Source File: AspectJAdviceParameterNameDiscovererTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Test
public void testTargetBindingTwoCandidates() {
	assertException(getMethod("oneObject"), "target(x) || target(y)", AmbiguousBindingException.class,
			"Found 2 candidate this(), target() or args() variables but only one unbound argument slot");
}
 
Example #6
Source File: AspectJAdviceParameterNameDiscovererTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Test
public void testThisBindingTwoCandidates() {
	assertException(getMethod("oneObject"), "this(x) || this(y)", AmbiguousBindingException.class,
			"Found 2 candidate this(), target() or args() variables but only one unbound argument slot");
}
 
Example #7
Source File: AspectJAdviceParameterNameDiscovererTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Test
public void testAmbiguousReturning() {
	assertException(getMethod("twoObjects"), "foo()", "obj", null, AmbiguousBindingException.class,
			"Binding of returning parameter 'obj' is ambiguous, there are 2 candidates.");
}
 
Example #8
Source File: AspectJAdviceParameterNameDiscovererTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Test
public void testOneJPAndTwoThrowables() {
	assertException(getMethod("jpAndTwoThrowables"), "foo()", null, "ex", AmbiguousBindingException.class,
			"Binding of throwing parameter 'ex' is ambiguous: could be bound to argument 1 or argument 2");
}
 
Example #9
Source File: TigerAspectJAdviceParameterNameDiscovererTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Test
public void testAmbiguousAnnotationTwoVars() {
	assertException(getMethod("twoAnnotations"),"@annotation(a) && @this(x)",AmbiguousBindingException.class,
			"Found 2 potential annotation variable(s), and 2 potential argument slots");
}
 
Example #10
Source File: AspectJAdviceParameterNameDiscovererTests.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Test
public void testArgsOnePrimitiveOneObject() {
	assertException(getMethod("oneObjectOnePrimitive"), "args(count,obj)", AmbiguousBindingException.class,
			"Found 2 candidate variable names but only one candidate binding slot when matching primitive args");
}
 
Example #11
Source File: AspectJAdviceParameterNameDiscovererTests.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Test
public void testAmbiguousArgsBinding() {
	assertException(getMethod("twoObjects"), "args(x,y)", AmbiguousBindingException.class,
			"Still 2 unbound args at this(),target(),args() binding stage, with no way to determine between them");
}
 
Example #12
Source File: AspectJAdviceParameterNameDiscovererTests.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Test
public void testArgsBindingOneObjectTwoCandidates() {
	assertException(getMethod("oneObject"), "args(x,y)", AmbiguousBindingException.class,
			"Found 2 candidate this(), target() or args() variables but only one unbound argument slot");
}
 
Example #13
Source File: TigerAspectJAdviceParameterNameDiscovererTests.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Test
public void testAmbiguousAnnotationTwoVars() {
	assertException(getMethod("twoAnnotations"),"@annotation(a) && @this(x)", AmbiguousBindingException.class,
			"Found 2 potential annotation variable(s), and 2 potential argument slots");
}
 
Example #14
Source File: AspectJAdviceParameterNameDiscovererTests.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Test
public void testThisBindingTwoCandidates() {
	assertException(getMethod("oneObject"), "this(x) || this(y)", AmbiguousBindingException.class,
			"Found 2 candidate this(), target() or args() variables but only one unbound argument slot");
}
 
Example #15
Source File: AspectJAdviceParameterNameDiscovererTests.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Test
public void testAmbiguousReturning() {
	assertException(getMethod("twoObjects"), "foo()", "obj", null, AmbiguousBindingException.class,
			"Binding of returning parameter 'obj' is ambiguous, there are 2 candidates.");
}
 
Example #16
Source File: AspectJAdviceParameterNameDiscovererTests.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Test
public void testOneJPAndTwoThrowables() {
	assertException(getMethod("jpAndTwoThrowables"), "foo()", null, "ex", AmbiguousBindingException.class,
			"Binding of throwing parameter 'ex' is ambiguous: could be bound to argument 1 or argument 2");
}
 
Example #17
Source File: TigerAspectJAdviceParameterNameDiscovererTests.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Test
public void testAmbiguousAnnotationTwoVars() {
	assertException(getMethod("twoAnnotations"),"@annotation(a) && @this(x)", AmbiguousBindingException.class,
			"Found 2 potential annotation variable(s), and 2 potential argument slots");
}
 
Example #18
Source File: AspectJAdviceParameterNameDiscovererTests.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Test
public void testArgsOnePrimitiveOneObject() {
	assertException(getMethod("oneObjectOnePrimitive"), "args(count,obj)", AmbiguousBindingException.class,
			"Found 2 candidate variable names but only one candidate binding slot when matching primitive args");
}
 
Example #19
Source File: AspectJAdviceParameterNameDiscovererTests.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Test
public void testAmbiguousArgsBinding() {
	assertException(getMethod("twoObjects"), "args(x,y)", AmbiguousBindingException.class,
			"Still 2 unbound args at this(),target(),args() binding stage, with no way to determine between them");
}
 
Example #20
Source File: AspectJAdviceParameterNameDiscovererTests.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Test
public void testArgsBindingOneObjectTwoCandidates() {
	assertException(getMethod("oneObject"), "args(x,y)", AmbiguousBindingException.class,
			"Found 2 candidate this(), target() or args() variables but only one unbound argument slot");
}
 
Example #21
Source File: AspectJAdviceParameterNameDiscovererTests.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Test
public void testTargetBindingTwoCandidates() {
	assertException(getMethod("oneObject"), "target(x) || target(y)", AmbiguousBindingException.class,
			"Found 2 candidate this(), target() or args() variables but only one unbound argument slot");
}
 
Example #22
Source File: AspectJAdviceParameterNameDiscovererTests.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Test
public void testThisBindingTwoCandidates() {
	assertException(getMethod("oneObject"), "this(x) || this(y)", AmbiguousBindingException.class,
			"Found 2 candidate this(), target() or args() variables but only one unbound argument slot");
}
 
Example #23
Source File: AspectJAdviceParameterNameDiscovererTests.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Test
public void testAmbiguousReturning() {
	assertException(getMethod("twoObjects"), "foo()", "obj", null, AmbiguousBindingException.class,
			"Binding of returning parameter 'obj' is ambiguous, there are 2 candidates.");
}
 
Example #24
Source File: AspectJAdviceParameterNameDiscovererTests.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Test
public void testOneJPAndTwoThrowables() {
	assertException(getMethod("jpAndTwoThrowables"), "foo()", null, "ex", AmbiguousBindingException.class,
			"Binding of throwing parameter 'ex' is ambiguous: could be bound to argument 1 or argument 2");
}