2 * Copyright (c) 2016 Red Hat, 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
8 package org.opendaylight.netvirt.aclservice.tests;
10 import org.junit.Rule;
11 import org.junit.rules.MethodRule;
12 import org.opendaylight.genius.datastoreutils.testutils.TestableDataTreeChangeListenerModule;
13 import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.config.rev160806.AclserviceConfig.SecurityGroupMode;
17 public class AclServiceStatefulTest extends AclServiceTestBase {
19 public @Rule MethodRule guice = new GuiceRule(new AclServiceModule(),
20 new AclServiceTestModule(SecurityGroupMode.Stateful),
21 new TestableDataTreeChangeListenerModule());
24 void newInterfaceCheck() {
25 assertFlowsInAnyOrder(FlowEntryObjectsStateful.expectedFlows(PORT_MAC_1));
29 void newInterfaceWithEtherTypeAclCheck() {
30 assertFlowsInAnyOrder(FlowEntryObjectsStateful.etherFlows());
34 public void newInterfaceWithTcpDstAclCheck() {
35 assertFlowsInAnyOrder(FlowEntryObjectsStateful.tcpFlows());
39 public void newInterfaceWithUdpDstAclCheck() {
40 assertFlowsInAnyOrder(FlowEntryObjectsStateful.udpFlows());
44 public void newInterfaceWithIcmpAclCheck() {
45 assertFlowsInAnyOrder(FlowEntryObjectsStateful.icmpFlows());
49 public void newInterfaceWithDstPortRangeCheck() {
50 assertFlowsInAnyOrder(FlowEntryObjectsStateful.dstRangeFlows());
54 public void newInterfaceWithDstAllPortsCheck() {
55 assertFlowsInAnyOrder(FlowEntryObjectsStateful.dstAllFlows());
59 void newInterfaceWithTwoAclsHavingSameRulesCheck() {
60 assertFlowsInAnyOrder(FlowEntryObjectsStateful.icmpFlowsForTwoAclsHavingSameRules());