2 * Copyright (c) 2015 Huawei, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.nemo.tool.sandbox.utils;
10 import junit.framework.TestCase;
11 import org.junit.Assert;
12 import org.junit.Test;
14 import static org.junit.Assert.*;
17 * Created by zhangmeng on 2016/1/14.
19 public class HexStringTest extends TestCase {
20 private HexString hexString;
22 public void testToHexString() throws Exception {
23 Assert.assertTrue(HexString.toHexString(1L,6) != null);
24 Assert.assertTrue(HexString.toHexString(1L) != null);
28 public void testFromHexString() throws Exception {
29 Assert.assertTrue(HexString.fromHexString("22:32") != null);
33 public void testToLong() throws Exception {
34 // System.out.println(HexString.toLong("11:22"));
35 Assert.assertTrue(HexString.toLong("11:22") != 0);