Rework BindingRuntimeTypes
[mdsal.git] / binding / mdsal-binding-java-api-generator / src / test / java / org / opendaylight / mdsal / binding / java / api / generator / BigDecimalRangeGeneratorTest.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 import static org.junit.Assert.assertNotNull;
12
13 import java.math.BigDecimal;
14 import java.math.BigInteger;
15 import org.junit.Test;
16
17 public class BigDecimalRangeGeneratorTest {
18
19     @Test
20     @Deprecated
21     public void convertTest() {
22         BigDecimalRangeGenerator generator = new BigDecimalRangeGenerator();
23         assertEquals(BigDecimal.valueOf(1L), generator.convert(1L));
24         assertEquals(BigDecimal.valueOf(1), generator.convert(new BigInteger("1")));
25         assertEquals(BigDecimal.valueOf(1), generator.convert(new Byte("1")));
26         assertEquals(BigDecimal.valueOf(1), generator.convert(new Short("1")));
27         assertEquals(BigDecimal.valueOf(1), generator.convert(new Integer("1")));
28         assertNotNull(generator.format(BigDecimal.TEN));
29     }
30 }