Merge branch 'master' of ../controller
[yangtools.git] / yang / yang-parser-spi / src / test / java / org / opendaylight / yangtools / yang / parser / spi / meta / ModelProcessingPhaseTest.java
1 /*
2  * Copyright (c) 2017 Pantheon Technologies s.r.o. 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.parser.spi.meta;
9
10 import static org.junit.Assert.assertEquals;
11 import static org.junit.Assert.assertNull;
12
13 import org.junit.Test;
14
15 public class ModelProcessingPhaseTest {
16     @Test
17     public void testSequencing() {
18         assertNull(ModelProcessingPhase.INIT.getPreviousPhase());
19         assertEquals(ModelProcessingPhase.INIT, ModelProcessingPhase.SOURCE_PRE_LINKAGE.getPreviousPhase());
20         assertEquals(ModelProcessingPhase.SOURCE_PRE_LINKAGE, ModelProcessingPhase.SOURCE_LINKAGE.getPreviousPhase());
21         assertEquals(ModelProcessingPhase.SOURCE_LINKAGE, ModelProcessingPhase.STATEMENT_DEFINITION.getPreviousPhase());
22         assertEquals(ModelProcessingPhase.STATEMENT_DEFINITION,
23             ModelProcessingPhase.FULL_DECLARATION.getPreviousPhase());
24         assertEquals(ModelProcessingPhase.FULL_DECLARATION,
25             ModelProcessingPhase.EFFECTIVE_MODEL.getPreviousPhase());
26     }
27 }