2 * Copyright (c) 2016 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.yin;
10 import static org.junit.Assert.assertEquals;
11 import static org.junit.Assert.assertNotNull;
13 import java.util.Optional;
14 import org.junit.Test;
15 import org.opendaylight.yangtools.yang.model.api.Module;
17 public class YinFileMetaStmtsTest extends AbstractYinModulesTest {
19 public void testMetaStatements() {
20 Module testModule = context.findModules("ietf-netconf-monitoring").iterator().next();
21 assertNotNull(testModule);
23 assertEquals(Optional.of("IETF NETCONF (Network Configuration) Working Group"), testModule.getOrganization());
24 assertEquals(Optional.of("WG Web: <http://tools.ietf.org/wg/netconf/>\n"
25 + "WG List: <mailto:netconf@ietf.org>\n"
27 + "WG Chair: Mehmet Ersue\n"
28 + " <mailto:mehmet.ersue@nsn.com>\n"
30 + "WG Chair: Bert Wijnen\n"
31 + " <mailto:bertietf@bwijnen.net>\n"
33 + "Editor: Mark Scott\n"
34 + " <mailto:mark.scott@ericsson.com>\n"
36 + "Editor: Martin Bjorklund\n"
37 + " <mailto:mbj@tail-f.com>"), testModule.getContact());
38 assertEquals(Optional.of("NETCONF Monitoring Module.\n" + "All elements in this module are read-only.\n" + "\n"
39 + "Copyright (c) 2010 IETF Trust and the persons identified as\n" + "authors of the code. All rights "
40 + "reserved.\n" + "\n" + "Redistribution and use in source and binary forms, with or\n" + "without "
41 + "modification, is permitted pursuant to, and subject\n" + "to the license terms contained in, the "
42 + "Simplified BSD\n" + "License set forth in Section 4.c of the IETF Trust's\n" + "Legal Provisions "
43 + "Relating to IETF Documents\n" + "(http://trustee.ietf.org/license-info).\n" + "\n" + "This version "
44 + "of this YANG module is part of RFC 6022; see\n" + "the RFC itself for full legal notices."),
45 testModule.getDescription());