Fix fileEncoding violations for checkstyle
[groupbasedpolicy.git] / renderers / iovisor / src / test / java / org / opendaylight / groupbasedpolicy / renderer / iovisor / sf / AllowActionTest.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. 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.groupbasedpolicy.renderer.iovisor.sf;
10
11 import static org.junit.Assert.assertEquals;
12 import static org.junit.Assert.assertTrue;
13
14 import org.junit.Before;
15 import org.junit.Test;
16 import org.opendaylight.groupbasedpolicy.api.ValidationResult;
17 import org.opendaylight.groupbasedpolicy.api.sf.AllowActionDefinition;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.subject.feature.instances.ActionInstance;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.policy.subject.feature.instances.ActionInstanceBuilder;
20
21 public class AllowActionTest {
22
23     AllowAction action;
24
25     @Before
26     public void init() {
27         action = new AllowAction();
28     }
29
30     @Test
31     public void testGetId() {
32         assertEquals(action.getId(), AllowActionDefinition.ID);
33     }
34
35     @Test
36     public void testGetActionDef() {
37         assertEquals(action.getActionDef(), AllowActionDefinition.DEFINITION);
38     }
39
40     @Test
41     public void testGetSupportedParameterValues() {
42         assertTrue(action.getSupportedParameterValues().isEmpty());
43     }
44
45     @Test
46     public void testValidate() {
47         ActionInstance actionInstance = new ActionInstanceBuilder().build();
48         ValidationResult result = action.validate(actionInstance);
49         assertTrue(result.isValid());
50     }
51
52 }