import javax.management.openmbean.SimpleType;
import java.lang.reflect.Method;
+import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;
import java.util.Map;
resolverPlugins.put(Date.class.getCanonicalName(), new DateResolver());
resolverPlugins.put(Character.class.getCanonicalName(), new CharResolver());
resolverPlugins.put(BigInteger.class.getCanonicalName(), new BigIntegerResolver());
+ resolverPlugins.put(BigDecimal.class.getCanonicalName(), new BigDecimalResolver());
}
static interface Resolver {
}
}
+ static class BigDecimalResolver extends DefaultResolver {
+
+ @Override
+ protected Object parseObject(Class<?> type, String value) throws Exception {
+ return new BigDecimal(value);
+ }
+ }
+
static class CharResolver extends DefaultResolver {
@Override
checkTypeConfigAttribute(response);
checkTypedefs(response);
checkEnum(response);
+ checkBigDecimal(response);
edit("netconfMessages/editConfig_remove.xml");
verifyNoMoreInteractions(netconfOperationRouter);
}
+ private void checkBigDecimal(Element response) {
+ int size = response.getElementsByTagName("sleep-factor").getLength();
+ assertEquals(1, size);
+ }
+
private void closeSession() throws NetconfDocumentedException, ParserConfigurationException, SAXException,
IOException {
DefaultCloseSession closeOp = new DefaultCloseSession(NETCONF_SESSION_ID);