@Test
public void testSimpleTypeExpressionList() throws Exception {
ModelNode description = createDescription(ModelType.LIST, ModelType.INT);
description.get(EXPRESSIONS_ALLOWED).set(true);
TypeConverter converter = getConverter(description);
assertCast(ArrayType.class, converter.getOpenType());
ModelNode node = new ModelNode();
node.add().set(new ValueExpression("${this.should.not.exist.!!!!!:1}"));
node.add().set(new ValueExpression("${this.should.not.exist.!!!!!:2}"));
String[] data = assertCast(String[].class, converter.fromModelNode(node));
Assert.assertEquals("${this.should.not.exist.!!!!!:1}", data[0]);
Assert.assertEquals("${this.should.not.exist.!!!!!:2}", data[1]);
ModelNode newNode = converter.toModelNode(data);
Assert.assertEquals(node, newNode);
}
ExpressionTypeConverterUnitTestCase.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:wildfly-core
作者:
评论列表
文章目录