Bump versions to 0.18.0-SNAPSHOT
[bgpcep.git] / bgp / openconfig-api / src / test / java / org / opendaylight / yang / gen / v1 / http / openconfig / net / yang / bgp / types / rev151009 / BgpStdCommunityTypeBuilderTest.java
1 /*
2  * Copyright (c) 2015 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
9 package org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009;
10
11 import org.junit.Assert;
12 import org.junit.Test;
13
14 public class BgpStdCommunityTypeBuilderTest {
15
16     @Test
17     public void testString() {
18         final BgpStdCommunityType commType = BgpStdCommunityTypeBuilder.getDefaultInstance("72:123");
19         Assert.assertEquals("72:123", commType.getString());
20     }
21
22     @Test
23     public void testUint32() {
24         final BgpStdCommunityType commType = BgpStdCommunityTypeBuilder.getDefaultInstance("123456");
25         Assert.assertEquals(123456L, commType.getUint32().longValue());
26     }
27
28     @Test(expected=IllegalArgumentException.class)
29     public void testInvalid() {
30         BgpStdCommunityTypeBuilder.getDefaultInstance("-1");
31     }
32
33 }