25090ac5c9f6ce4619a3bc8c4beb7cdc5a4d8855
[packetcable.git] / packetcable-policy-server / src / test / java / org / opendaylight / controller / packetcable / provider / validation / impl / CcapsValidatorProviderFactoryTest.java
1 /*
2  * Copyright (c) 2015 CableLabs 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
9 package org.opendaylight.controller.packetcable.provider.validation.impl;
10
11 import static junit.framework.TestCase.assertNotNull;
12 import static org.hamcrest.CoreMatchers.instanceOf;
13 import static org.hamcrest.MatcherAssert.assertThat;
14
15 import org.junit.Test;
16 import org.opendaylight.controller.packetcable.provider.validation.ValidatorProvider;
17 import org.opendaylight.yang.gen.v1.urn.packetcable.rev161219.Ccaps;
18 import org.opendaylight.yang.gen.v1.urn.packetcable.rev161219.ccap.attributes.AmId;
19 import org.opendaylight.yang.gen.v1.urn.packetcable.rev161219.ccap.attributes.Connection;
20 import org.opendaylight.yang.gen.v1.urn.packetcable.rev161219.ccaps.Ccap;
21
22 /**
23  * @author rvail
24  */
25 public class CcapsValidatorProviderFactoryTest {
26
27     private final CcapsValidatorProviderFactory factory = new CcapsValidatorProviderFactory();
28
29     @Test
30     public void validBuild() {
31         assertNotNull(factory.build());
32         assertThat(factory.build(),  instanceOf(ValidatorProvider.class));
33
34         assertNotNull(factory.build().validatorFor(Ccaps.class));
35         assertNotNull(factory.build().validatorFor(Ccap.class));
36         assertNotNull(factory.build().validatorFor(AmId.class));
37         assertNotNull(factory.build().validatorFor(Connection.class));
38     }
39
40 }