Polish contribution
Closes gh-1070
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -30,6 +30,7 @@ import static org.junit.Assert.*;
|
||||
* Unit tests for {@link MethodBasedEvaluationContext}.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @author Sergey Podgurskiy
|
||||
*/
|
||||
public class MethodBasedEvaluationContextTests {
|
||||
|
||||
@@ -92,10 +93,11 @@ public class MethodBasedEvaluationContextTests {
|
||||
@Test
|
||||
public void varArgMultiple() {
|
||||
Method method = ReflectionUtils.findMethod(SampleMethods.class, "hello", Boolean.class, String[].class);
|
||||
MethodBasedEvaluationContext context = createEvaluationContext(method, new Object[] {null, new String[]{"hello", "hi"}});
|
||||
MethodBasedEvaluationContext context = createEvaluationContext(method,
|
||||
new Object[] {null, new String[]{"hello", "hi"}});
|
||||
|
||||
assertNull(context.lookupVariable("p0"));
|
||||
assertNotNull(context.lookupVariable("p1"));
|
||||
assertArrayEquals(new String[]{"hello", "hi"}, (String[]) context.lookupVariable("p1"));
|
||||
}
|
||||
|
||||
private MethodBasedEvaluationContext createEvaluationContext(Method method, Object[] args) {
|
||||
@@ -109,9 +111,10 @@ public class MethodBasedEvaluationContextTests {
|
||||
private void hello(String foo, Boolean flag) {
|
||||
}
|
||||
|
||||
private void hello(Boolean flag, String ... vararg){
|
||||
private void hello(Boolean flag, String... vararg){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user