Improve Decimal64 range support
[mdsal.git] / binding / mdsal-binding-java-api-generator / src / test / java / org / opendaylight / mdsal / binding / java / api / generator / Decimal64RangeGeneratorTest.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, 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.mdsal.binding.java.api.generator;
9
10 import static org.junit.Assert.assertEquals;
11
12 import java.math.BigInteger;
13 import org.junit.Test;
14 import org.opendaylight.yangtools.yang.common.Decimal64;
15
16 public class Decimal64RangeGeneratorTest {
17     @Test
18     @Deprecated
19     public void convertTest() {
20         Decimal64RangeGenerator generator = new Decimal64RangeGenerator();
21         Decimal64 one = Decimal64.valueOf(1, 1);
22         assertEquals(one, generator.convert(1L));
23         assertEquals(one, generator.convert(new BigInteger("1")));
24         assertEquals(one, generator.convert(Byte.valueOf("1")));
25         assertEquals(one, generator.convert(Short.valueOf("1")));
26         assertEquals(one, generator.convert(Integer.valueOf("1")));
27     }
28 }