09b26cda123e4d6416be77c40d39357beb62fc63
[yangtools.git] / yang / yang-data-api / src / test / java / org / opendaylight / yangtools / yang / data / api / schema / tree / spi / VersionTest.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 package org.opendaylight.yangtools.yang.data.api.schema.tree.spi;
9
10 import static org.junit.Assert.assertFalse;
11 import org.junit.Test;
12
13 public class VersionTest {
14
15     @Test
16     public void testInitial() {
17         final Version v1 = Version.initial();
18         final Version v2 = Version.initial();
19
20         assertFalse(v1.equals(v2));
21         assertFalse(v2.equals(v1));
22      }
23
24     @Test
25     public void testNext() {
26         final Version v1 = Version.initial();
27         final Version v2 = v1.next();
28         final Version v3 = v2.next();
29         final Version v4 = v1.next();
30
31         assertFalse(v3.equals(v4));
32         assertFalse(v4.equals(v3));
33     }
34 }