YANG revision dates mass-update
[bgpcep.git] / bgp / extensions / route-target / src / test / java / org / opendaylight / protocol / bgp / route / targetcontrain / impl / activators / BGPActivatorTest.java
1 /*
2  * Copyright (c) 2018 AT&T Intellectual Property. 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
9 package org.opendaylight.protocol.bgp.route.targetcontrain.impl.activators;
10
11 import static org.junit.Assert.assertEquals;
12 import static org.junit.Assert.assertNull;
13 import static org.opendaylight.protocol.bgp.route.targetcontrain.impl.activators.BGPActivator.RT_SAFI;
14
15 import org.junit.Test;
16 import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderContext;
17 import org.opendaylight.protocol.bgp.parser.spi.pojo.SimpleBGPExtensionProviderContext;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.route.target.constrain.rev180618.RouteTargetConstrainSubsequentAddressFamily;
19
20 public final class BGPActivatorTest {
21     @Test
22     public void testActivator() {
23         final BGPActivator act = new BGPActivator();
24         final BGPExtensionProviderContext context = new SimpleBGPExtensionProviderContext();
25         assertNull(context.getSubsequentAddressFamilyRegistry().classForFamily(RT_SAFI));
26         act.start(context);
27         assertEquals(RouteTargetConstrainSubsequentAddressFamily.class, context.getSubsequentAddressFamilyRegistry()
28                 .classForFamily(RT_SAFI));
29         act.close();
30     }
31 }