2 * Copyright (c) 2017 AT&T Intellectual Property. 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
9 package org.opendaylight.bgpcep.config.loader.bmp;
11 import static org.junit.Assert.assertEquals;
12 import static org.junit.Assert.assertNotNull;
13 import static org.opendaylight.bgpcep.config.loader.bmp.BmpMonitorConfigFileProcessor.ODL_BMP_MONITORS_IID;
14 import static org.opendaylight.protocol.util.CheckUtil.checkNotPresentConfiguration;
15 import static org.opendaylight.protocol.util.CheckUtil.checkPresentConfiguration;
17 import org.junit.Before;
18 import org.junit.Test;
19 import org.opendaylight.bgpcep.config.loader.impl.AbstractConfigLoader;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.monitor.config.rev180329.OdlBmpMonitors;
21 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
23 public class BmpMonitorConfigFileProcessorTest extends AbstractConfigLoader {
27 public void setUp() throws Exception {
32 public void configFileTest() throws Exception {
33 checkNotPresentConfiguration(getDataBroker(), ODL_BMP_MONITORS_IID);
35 assertNotNull(ClassLoader.getSystemClassLoader().getResource("initial/odl-bmp-monitors-config.xml"));
36 final BmpMonitorConfigFileProcessor processor = new BmpMonitorConfigFileProcessor(this.configLoader,
39 checkPresentConfiguration(getDataBroker(), ODL_BMP_MONITORS_IID);
41 assertEquals(SchemaPath.create(true, OdlBmpMonitors.QNAME),
42 processor.getSchemaPath());