Merge "delete all .class files" into stable/beryllium
[nemo.git] / nemo-tools / sandbox / src / test / java / org / opendaylight / nemo / tool / sandbox / utils / HexStringTest.java
1 /*
2  * Copyright (c) 2015 Huawei, Inc. and others. All rights reserved.
3  *
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
7  */
8 package org.opendaylight.nemo.tool.sandbox.utils;
9
10 import junit.framework.TestCase;
11 import org.junit.Assert;
12 import org.junit.Test;
13
14 import static org.junit.Assert.*;
15
16 /**
17  * Created by zhangmeng on 2016/1/14.
18  */
19 public class HexStringTest extends TestCase {
20     private HexString hexString;
21     @Test
22     public void testToHexString() throws Exception {
23         Assert.assertTrue(HexString.toHexString(1L,6) != null);
24         Assert.assertTrue(HexString.toHexString(1L) != null);
25     }
26
27     @Test
28     public void testFromHexString() throws Exception {
29         Assert.assertTrue(HexString.fromHexString("22:32") != null);
30     }
31
32     @Test
33     public void testToLong() throws Exception {
34 //        System.out.println(HexString.toLong("11:22"));
35         Assert.assertTrue(HexString.toLong("11:22") != 0);
36     }
37 }