You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by lu...@apache.org on 2020/12/24 10:43:41 UTC
[commons-ognl] branch master updated: Adjusts test to new JUnit lib
This is an automated email from the ASF dual-hosted git repository.
lukaszlenart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-ognl.git
The following commit(s) were added to refs/heads/master by this push:
new 8308329 Adjusts test to new JUnit lib
8308329 is described below
commit 83083297e82418cd19f2ddaa7bca68b12798b02a
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Thu Dec 24 11:43:26 2020 +0100
Adjusts test to new JUnit lib
---
.../java/org/apache/commons/ognl/test/ASTChainTest.java | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/src/test/java/org/apache/commons/ognl/test/ASTChainTest.java b/src/test/java/org/apache/commons/ognl/test/ASTChainTest.java
index 50ed64f..0bf51aa 100644
--- a/src/test/java/org/apache/commons/ognl/test/ASTChainTest.java
+++ b/src/test/java/org/apache/commons/ognl/test/ASTChainTest.java
@@ -27,23 +27,18 @@ import org.apache.commons.ognl.test.objects.IndexedSetObject;
/**
* Tests for {@link org.apache.commons.ognl.ASTChain}.
*/
-public class ASTChainTest
- extends TestCase
-{
+public class ASTChainTest extends TestCase {
- public void test_Get_Indexed_Value()
- throws Exception
- {
-
- OgnlContext context = (OgnlContext) Ognl.createDefaultContext( null );
+ public void test_Get_Indexed_Value() throws Exception {
+ OgnlContext context = (OgnlContext) Ognl.createDefaultContext(null);
IndexedSetObject root = new IndexedSetObject();
String expr = "thing[\"x\"].val";
- assertEquals( 1, Ognl.getValue( expr, context, root ) );
+ assertEquals(1, (int) Ognl.getValue(expr, context, root));
- Ognl.setValue( expr, context, root, new Integer( 2 ) );
+ Ognl.setValue(expr, context, root, 2);
- assertEquals( 2, Ognl.getValue( expr, context, root ) );
+ assertEquals(2, (int) Ognl.getValue(expr, context, root));
}
}