2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.yangtools.yang.stmt.retest;
10 import static org.junit.Assert.assertEquals;
11 import static org.junit.Assert.assertTrue;
13 import java.text.DateFormat;
14 import java.text.SimpleDateFormat;
16 import org.junit.Before;
17 import org.junit.Test;
18 import org.opendaylight.yangtools.yang.model.api.Module;
21 * Test for testing of extensions and their arguments.
23 * @author Lukas Sedlak <lsedlak@cisco.com>
25 public class ParsingExtensionValueTest {
27 private Set<Module> modules;
30 public void init() throws Exception {
31 //TODO: change test or create new module in order to respect new statement parser validations
32 DateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
35 modules = TestUtils.loadModules(getClass().getResource("/extensions").toURI());
36 } catch (Exception e) {
37 assertEquals(IllegalArgumentException.class, e.getClass());
38 assertTrue(e.getMessage().startsWith("ext:id is not a YANG statement or use of extension"));
43 public void parsingExtensionArgsTest() {