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
9 package org.opendaylight.groupbasedpolicy.renderer.iovisor.sf;
11 import static org.junit.Assert.assertEquals;
12 import static org.junit.Assert.assertTrue;
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;
21 public class AllowActionTest {
27 action = new AllowAction();
31 public void testGetId() {
32 assertEquals(action.getId(), AllowActionDefinition.ID);
36 public void testGetActionDef() {
37 assertEquals(action.getActionDef(), AllowActionDefinition.DEFINITION);
41 public void testGetSupportedParameterValues() {
42 assertTrue(action.getSupportedParameterValues().isEmpty());
46 public void testValidate() {
47 ActionInstance actionInstance = new ActionInstanceBuilder().build();
48 ValidationResult result = action.validate(actionInstance);
49 assertTrue(result.isValid());