7aec1eeaf47ae1e8f590bc7d67a3ebf80ba2a9b9
[ovsdb.git] / openstack / net-virt-providers / src / test / java / org / opendaylight / ovsdb / openstack / netvirt / providers / openflow13 / PipelineOrchestratorTest.java
1 package org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13;
2
3 import static org.junit.Assert.assertEquals;
4 import static org.junit.Assert.assertNull;
5
6 import org.junit.Before;
7 import org.junit.Test;
8
9 public class PipelineOrchestratorTest {
10     PipelineOrchestrator orchestrator;
11     @Before
12     public void initialize() {
13         orchestrator = new PipelineOrchestratorImpl();
14     }
15
16     @Test
17     public void testPipeline() {
18         assertEquals(orchestrator.getNextServiceInPipeline(Service.CLASSIFIER), Service.ARP_RESPONDER);
19         assertEquals(orchestrator.getNextServiceInPipeline(Service.ARP_RESPONDER), Service.INBOUND_NAT);
20         assertEquals(orchestrator.getNextServiceInPipeline(Service.INBOUND_NAT), Service.INGRESS_ACL);
21         assertEquals(orchestrator.getNextServiceInPipeline(Service.INGRESS_ACL), Service.LOAD_BALANCER);
22         assertEquals(orchestrator.getNextServiceInPipeline(Service.LOAD_BALANCER), Service.ROUTING);
23         assertEquals(orchestrator.getNextServiceInPipeline(Service.ROUTING), Service.L2_REWRITE);
24         assertEquals(orchestrator.getNextServiceInPipeline(Service.L2_REWRITE), Service.L2_FORWARDING);
25         assertEquals(orchestrator.getNextServiceInPipeline(Service.L2_FORWARDING), Service.EGRESS_ACL);
26         assertEquals(orchestrator.getNextServiceInPipeline(Service.EGRESS_ACL), Service.OUTBOUND_NAT);
27         assertNull(orchestrator.getNextServiceInPipeline(Service.OUTBOUND_NAT));
28     }
29 }