Remove dependency on Exificient due to licensing incompatibility
[controller.git] / opendaylight / netconf / netconf-impl / src / test / java / org / opendaylight / controller / netconf / impl / ExiEncodeDecodeTest.java
1 /*\r
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
3  *\r
4  * This program and the accompanying materials are made available under the\r
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
6  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
7  */\r
8 package org.opendaylight.controller.netconf.impl;\r
9 \r
10 import static junit.framework.Assert.assertNotNull;\r
11 \r
12 import org.junit.Test;\r
13 import org.opendaylight.controller.netconf.api.NetconfMessage;\r
14 import org.opendaylight.controller.netconf.util.test.XmlFileLoader;\r
15 \r
16 public class ExiEncodeDecodeTest  {\r
17     @Test\r
18     public void encodeExi() throws Exception{\r
19 \r
20         String startExiString = XmlFileLoader.xmlFileToString("netconfMessages/startExi.xml");\r
21         assertNotNull(startExiString);\r
22 \r
23         NetconfMessage startExiMessage = XmlFileLoader.xmlFileToNetconfMessage(("netconfMessages/startExi.xml"));\r
24         assertNotNull(startExiMessage);\r
25 \r
26         /*\r
27         ExiParameters exiParams = new ExiParameters();\r
28         exiParams.setParametersFromXmlElement(XmlElement.fromDomElement(startExiMessage.getDocument().getDocumentElement()));\r
29         assertNotNull(exiParams);\r
30 \r
31         ByteBuf encodedBuf = Unpooled.buffer();\r
32         ByteBuf sourceBuf = Unpooled.copiedBuffer(startExiString.getBytes());\r
33         ExiUtil.encode(sourceBuf, encodedBuf, exiParams);\r
34 \r
35         List<Object> newOut = new ArrayList<Object>();\r
36         ExiUtil.decode(encodedBuf, newOut, exiParams);\r
37 \r
38         ByteBuf decodedBuf = (ByteBuf)newOut.get(0);\r
39         String decodedString = new String(decodedBuf.array(),"UTF-8");\r
40         assertNotNull(decodedString);\r
41         */\r
42     }\r
43 }\r